Content-Length header is not copied while using copy as curl
Reported by
karlo.s...@gmail.com,
Jan 19 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 Steps to reproduce the problem: 1. Go to http://www.filedropper.com/ 2. open developer tools => network tab, check preserve log 3. upload a file 4. select http://www.filedropper.com/index.php?xml=true POSt action 5. right click => copy => copy as curl 6. paste in terminal What is the expected behavior? Request header Content-Length with upload value is also copied What went wrong? Content-Length request header value is not copied Did this work before? N/A Chrome version: 55.0.2883.95 Channel: stable OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 24.0 r0
,
Jan 19 2017
Curl wrongly calculates content length. For example from attached file: curl Content-Length is 440 But proper Content-Length is 16991
,
Jan 19 2017
That command doesn't post actual files because --data-binary is just a literal plain text parameter which is 440 characters long in your case. To post the actual files you need -F or --form parameter.
,
Jan 20 2017
@karlo.smid: Request you to please provide an update as suggested in the above comment. Thanks.!
,
Jan 20 2017
I confirm that developer tools copy as curl works as expected. Other curl parameters should be used to upload a file.
,
Jan 20 2017
Closing as per #5, thanks for clarification. |
|||
►
Sign in to add a comment |
|||
Comment 1 by woxxom@gmail.com
, Jan 19 2017