bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] post-data vs post-file


From: Micah Cowan
Subject: Re: [Bug-wget] post-data vs post-file
Date: Thu, 22 Dec 2011 12:43:55 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0

One likely explanation for this difference would be if samplefile ends
with a newline.

Note that the shell will strip any trailing whitespace after expanding a
command substitution like $(cat samplefile).

HTH,
-mjc

(2011年12月22日 06:36), Guillaume Baudot wrote:
> Hello there.
>
> Using wget version "1.11.4 Red Hat modified", I noticed the folowing
> difference in behaviour between post-data and post-file options (can't
> tell if bug is version specific, RH specific or not...): the post-file
> adds a trailing character to file content
>
>
> $wget -v -d -S --post-file='samplefile'
> sampleURL<http://sandbox.xml.agoda.com/xmlpartner/XmlService.svc/search_srv2>
> [...]Content-Length: 546[...]
>
> $wget -v -d -S --post-data="$(cat samplefile)"
> sampleURL<http://sandbox.xml.agoda.com/xmlpartner/XmlService.svc/search_srv2>
> [...]Content-Length: 545[...]
>
>
> Regards,
> GB




reply via email to

[Prev in Thread] Current Thread [Next in Thread]