Hi. Indeed, my sample file ended with a linefeed. Anyway, if I remove this and retry both commands, behavior is exactly the same, as well as content length of POST data.
Thanks for caring. GB Micah Cowan a écrit : 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><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><http://sandbox.xml.agoda.com/xmlpartner/XmlService.svc/search_srv2> [...]Content-Length: 545[...] Regards, GB -- [cid:[email protected]]<http://www.kelkoo.co.uk/> [cid:[email protected]] [cid:[email protected]] Guillaume, Baudot Travel Market Engireering [email protected]<mailto:[email protected]> Tel: +33 4 56 09 07 65 Fax: +33 4 56 09 07 01 Address: Parc Sud Galaxie, 6 rue des Méridiens, 38130 Echirolles [cid:[email protected]] ________________________________ Kelkoo SAS Société par Actions Simplifiée Au capital de € 4.168.964,30 Siège social : 8, rue du Sentier 75002 Paris 425 093 069 RCS Paris Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire et d'en avertir l'expéditeur.
