cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: polarssl: add ALPN support

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 19 May 2014 20:34:47 +0200

On Mon, May 19, 2014 at 02:20:25AM -0700, Fabian Frank wrote:
> here is a patch to add ALPN support when curl is being used with PolarSSL. Please note that nghttp2¢s public test servers have ALPN disabled right now, so you have to run your own nghttpd locally to test ALPN negotiation of h2-12.

> +#ifdef HAS_ALPN
> + const char* protocols[] = {NGHTTP2_PROTO_VERSION_ID, ALPN_HTTP_1_1,
> + NULL};
> +#endif

Minor nitpick: this should be static const char* const protocols[] to make the
array itself const and avoid building it on the stack each time.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-19