]> sjero.net Git - wget/commitdiff
Clarify operation of --post-file.
authorMicah Cowan <micah@cowan.name>
Tue, 7 Jul 2009 06:12:06 +0000 (23:12 -0700)
committerMicah Cowan <micah@cowan.name>
Tue, 7 Jul 2009 06:12:06 +0000 (23:12 -0700)
doc/ChangeLog
doc/wget.texi

index 92866ad885dbcd420e64b2d43e05f03ad7c2508c..862ed129f65501daaa74c7e87dbc78468b74308b 100644 (file)
@@ -4,6 +4,7 @@
        --input-file, implying that --force-html isn't necessary when the
        input is in HTML file. Improve accuracy of --base description.
        (Wgetrc Commands): Improve accuracy of "base" description.
        --input-file, implying that --force-html isn't necessary when the
        input is in HTML file. Improve accuracy of --base description.
        (Wgetrc Commands): Improve accuracy of "base" description.
+       (HTTP Options): Clarify operation of --post-file.
 
 2009-07-03  Micah Cowan  <micah@cowan.name>
 
 
 2009-07-03  Micah Cowan  <micah@cowan.name>
 
index 60634f15318e61703700aafdb789bb945540f742..f040e8dce55894bc5801c1c3cb883dd427f8a59a 100644 (file)
@@ -1394,10 +1394,20 @@ not to send the @code{User-Agent} header in @sc{http} requests.
 @cindex POST
 @item --post-data=@var{string}
 @itemx --post-file=@var{file}
 @cindex POST
 @item --post-data=@var{string}
 @itemx --post-file=@var{file}
-Use POST as the method for all HTTP requests and send the specified data
-in the request body.  @code{--post-data} sends @var{string} as data,
-whereas @code{--post-file} sends the contents of @var{file}.  Other than
-that, they work in exactly the same way.
+Use POST as the method for all HTTP requests and send the specified
+data in the request body.  @samp{--post-data} sends @var{string} as
+data, whereas @samp{--post-file} sends the contents of @var{file}.
+Other than that, they work in exactly the same way. In particular,
+they @emph{both} expect content of the form @code{key1=value1&key2=value2},
+with percent-encoding for special characters; the only difference is
+that one expects its content as a command-line paramter and the other
+accepts its content from a file. In particular, @samp{--post-file} is
+@emph{not} for transmitting files as form attachments: those must
+appear as @code{key=value} data (with appropriate percent-coding) just
+like everything else. Wget does not currently support
+@code{multipart/form-data} for transmitting POST data; only
+@code{application/x-www-form-urlencoded}. Only one of
+@samp{--post-data} and @samp{--post-file} should be specified.
 
 Please be aware that Wget needs to know the size of the POST data in
 advance.  Therefore the argument to @code{--post-file} must be a regular
 
 Please be aware that Wget needs to know the size of the POST data in
 advance.  Therefore the argument to @code{--post-file} must be a regular