Re: How to manage buggy http/2 in MacOS and Linux
Date: Tue, 19 Nov 2019 03:19:27 -0500
On 11/18/2019 8:42 AM, Jeroen Ooms via curl-library wrote:
> I maintain the libcurl R bindings which are used by 1M+ users to build
> clients for countless web services. On MacOS and Linux, the bindings
> link to the system version of libcurl. As of MacOS Catalina (released
> last month) this is now libcurl 7.64.1 which is the first time that
> http/2 is enabled by default. This is where the problems begin.
>
> Users that have upgraded to Catalina are reporting applications that
> were stable before are now randomly giving "Error in the HTTP2 framing
> layer" errors. Similar sounds from Linux users. As we know, HTTP/2
> support in libcurl was quite buggy until very recently (eg:
> https://daniel.haxx.se/blog/2018/09/05/curl-7-61-1-comes-with-only-bug-fixes/
> ) and maybe still today not as reliable as HTTP/1.
>
> As maintainer of the bindings, I'm not sure how to handle this. One
> solution would to be override the default CURLOPT_HTTP_VERSION in the
> bindings to CURL_HTTP_VERSION_1_1 for certain versions of libcurl, but
> it's hard to judge which versions of libcurl have robust http/2
> support.
"Quite buggy" is an overstatement. I am subscribed to your repo and I am
not aware of issues regarding this. Without knowing what was reported I
think it's premature to say. If you are aware of a specific version you
need to work around then you can use version info's version_num and
nghttp2_ver_num, however the latter is only available since 7.66.0. Both
have format (MAJOR << 16) | (MINOR << 8) | PATCH.
curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
ver->version_num < 0x074300 /* libcurl 7.67.0 */ ||
ver->age < 5 /* libcurl 7.66.0 */ || ver->nghttp2_ver_num < 0x012600 /*
nghttp2 1.38.0 */
then fall back to http 1.1
(age check isn't necessary above since the checked curl version is
greater than that, but left in for example)
I suppose it's also possible to report the problem you are having to
Apple, they may fix it if they backport patches like other OS
maintainers do.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-11-19