New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 682791 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Content-Length header is not copied while using copy as curl

Reported by karlo.s...@gmail.com, Jan 19 2017

Issue description

UserAgent: 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
 

Comment 1 by woxxom@gmail.com, Jan 19 2017

curl should add the Content-Length header automatically, check it by running curl with -v parameter (or -D).
Curl wrongly calculates content length.
For example from attached file:
curl Content-Length is 440
But proper Content-Length is 16991
content_length.txt
2.8 KB View Download

Comment 3 by woxxom@gmail.com, 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.
Cc: ranjitkan@chromium.org
Labels: Needs-Feedback
@karlo.smid: Request you to please provide an update as suggested in the above comment.

Thanks.!
I confirm that developer tools copy as curl works as expected. Other curl parameters should be used to upload a file.

Comment 6 by caseq@chromium.org, Jan 20 2017

Status: WontFix (was: Unconfirmed)
Closing as per #5, thanks for clarification.

Sign in to add a comment