Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set CURLOPT_ENCODING to nullptr in case of curl7 (#2737)
* set CURLOPT_ENCODING to nullptr in case of curl7 Curl 7 introduced more strictness how it handles CURLOPT_ENCODING. With earlier versions it as apparently okay when the server sent an encoding curl did not implement. Newer versions are much more stricter and refuse to complete downloads under such circumstances. This leads to almost nothing loading. The culrpit seemingly being either the simulator or asset servers sending headers curls does not accept. The workaround is to set CURLOPT_ENCODING to nullptr rather than "". This does come with the implication that curl will not handle decompression transparently, rather this burden gets shifted to the application. It will also not send Accept-Encoding headers automatically. * Adapt a few more occurences of CURLOPT_ENCODING for curl >= 7
- Loading branch information
7bdd2b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You speak about curl >= 7 in the comment, but you test for LIBCURL_VERSION_MAJOR > 7 in the code... Which one is correct ?
FYI, I had, in the Cool VL Viewer, curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); only for curl 7.59 and older, and this option was not used at all for curl 7.60 and newer (but I only tested up to v7.64 with my viewer).
Note also that a 'grep -r getCurlTemplateHandle indra/*' shows that getCurlTemplateHandle() is used only by createEasyHandle() in httpcommon.cpp, but another grep with createEasyHandle reveals that it is not used anywhere in the viewer: these two functions could therefore be entirely removed...