Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
HTTP Raw option on win64 doubles amount of data when used with HTTP Chunks #2303
I did this
I'm investigating HTTP Chunked vs No Chunks using NancyFX 2.0 / Kestrel Web Server. During this investigation I noticed big file differences when using cURL Raw option. The output both for binary and text doubles in size when using cURL on Win64 in combination with HTTP Chunking.
I expected the following
Same result on Win64 as on my Macbook!
curl/7.58.0 WRONG (Win64)
[curl -V output]
On my Windows 10 64 bits
Problem showed up on Windows 10 - 64 bits on my HP Probook.
Attached 4 files zipped showing the problem when you diff them:
I'm not that in to network related stuff so it could be I'm doing something wrong. But the difference in file size is strange.
If you use
To me this looks like your server sends curl something weird. What does curl say on this response when you don't use
Curl version 7.53.1 is not having this issue:
For anybody interested:
Difference in file sizes between cURL version 7.53.1 and 7.58.0 on Win64:
It looks to be a version thing: cURL 7.58.0 builded on my macbook has te same issue.
Diff on trace files:
Notice the TCP_NODELAY difference! But when I explicitly set
for both raw output I still have double for v7.58.0.
Tested some older versions and found the version in which its different:
Source compare and Github blame comes up with:
Good luck in fixing!
Building v7.58.0 from cloned master on my mac showed me:
So on Mac its fine. Unfortunately I don't have time to rebuild it on Win64 but I think this is not really necessary to check it there.
Thanks guys for the quick actions and feedback!
No. --raw disables all decoding. In this case you have included the http headers in the response (-i) so those come first, then the chunked encoding is not being decoded so the contents will be the hex value of each chunk and then the chunk, and finally a chunk of 0 (assuming the transfer completed).
I checked Win64 and it works there. Thanks for your report and all your follow-ups.
curl has unit tests and also full tests using the curl tool, which also tests libcurl and I guess you could refer to as system testing. integration testing depends how you define it. the tests are not combined, they are run sequentially. if some scenario needs to be varied in most cases there's a libcurl test with an ifdef guard separating the two tests or just a separate test.