I host a file on a server that is fetched by CocoaPods as part of a pod. CocoaPods uses curl internally to fetch this. Curl 7.54.0 in the latest macOS 10.14.2 (18C54) has a bug which causes issues with files fetched over HTTP/2. This means that developers using my pod keep getting install failures due to the curl bug.
As curl is used inside Cocoapods I can’t provide command line switches to curl (at least I don’t think Cocoapods provides a way to do so).
Is there any way using Apache configuration, htaccess or PHP I can enforce HTTP/1.1?
2
Answers
cURL
has a command-line switch-http1.1
. in PHP that might be:… that’s at least what the documentation says.
mod_rewrite
can also be used to forbidHTTP/2.0
(but no clue how to switch it):I think that virtual host configuration is the most solid (this won’t work in a
.htaccess
file):You can decide which version to use by setting the option
CURLOPT_HTTP_VERSION