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
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
@bagder Perhaps you could check for version >= 3.9 and < 4.0 instead of only >= 3.9? It's been fixed in 4.0 (present in 3.9.0 as well as 3.9.1). Being able to diagnose undefined behavior at compile time is pretty cool, I think, as long as there are no false positives :-)
okay, the current red travis builds are actual test case failures that appear to be either bugs in curl with codeset conversion enabled, or they're bugs in the test cases. I believe each one needs to be researched individually to see where we need to fix or possibly even if the test needs to be disabled for this build setup.
Problem with test 545 resolved by commit d3db7bc.
Identified problem with test 555: when character conversion is enabled, data ends in CRLF instead of LF.
How would you fix it:
If CURL_DOES_CONVERSION is enabled, uploaded LFs are mapped to CRLFs, giving a result that is different from what is expected. This commit avoids using CURLOPT_TRANSFERTEXT and directly encodes data to upload in ascii. Bug: #1872
Test 555 fixed a third way by commit bd5b9e5.
I have preferred droping the conversion stuff in this test because it is not its target. The iconv travis job should succeed now.
However there is a real mess for the Content-Length calculation when using CURLOPT_POSTFIELDSIZE + CURLOPT_TRANSFERTEXT/CURLOPT_CRLF and I raise a red flag about it. Should probably be the subject of an issue and additional tests.
In addition, doc says CURLOPT_TRANSFERTEXT is for FTP only, while it also acts on http data (in transfer.c, so maybe other protocols) when CURL_DOES_CONVERSION is enabled.
Please note also that with charconv enabled, a single LF is uploaded as CRCRLF if CURLOPT_TRANSFERTEXT and CURLOPT_CRLF are both enabled.
There may be more undiscovered oddities around that...