[Libwebsockets] [EXT] Re: Missing LWS_CALLBACK_HTTP_BODY_COMPLETION when using H2 https

Avigail Wilk awilk at kramerav.com
Wed Nov 17 13:36:45 CET 2021

What version are you using?
I saw this problem too, in v4.2.
 I didn't have time to check v4.3 yet and was wondering if it might have been solved there.

-----Original Message-----
From: Libwebsockets <libwebsockets-bounces at ml.libwebsockets.org> On Behalf Of S?ren Holm
Sent: Wednesday, November 17, 2021 2:28 PM
To: libwebsockets at ml.libwebsockets.org
Subject: [EXT] Re: [Libwebsockets] Missing LWS_CALLBACK_HTTP_BODY_COMPLETION when using H2 https

Sweet - I'll kill HTTP2 for now them.

Should I reporte hte HTTP2 in a bugreport ?

onsdag den 17. november 2021 12.44.27 CET skrev Andy Green:
> On 11/17/21 10:45, Søren Holm wrote:
> > Hi
> >
> > I get no LWS_CALLBACK_HTTP_BODY_COMPLETION on posts over https - I 
> > do however get that callback if I disable the ssl key and cert. 
> > Thereby running the server in http mode.
> >
> > I use commandline curl for the post.
> >
> > The difference as I can see is that curl somehow end up using HTTP2 
> > on https, but HTTP1.1 on regular http. Forcing curl to use HTTP1.1 
> > on the https brings the callback back.
> >
> > So, is something fweird going on on H2?
> It looks like some problem with how it is closed...
>  >> curl: (92) HTTP/2 stream 1 was not closed cleanly before end of 
> the
> underlying stream
> > Can I disable H2 completely without recompiling libwebsocket?
> You can disable it for build at cmake with -DLWS_WITH_HTTP2=0.
> To do it at runtime, at vhost creation time (or context creation time 
> if you just use the default vhost), you can tell the vhost what alpn 
> services it should offer with info->alpn.  If you leave it NULL, then 
> it figures out what to offer based on what roles are enabled in the build.
> In this case if you set it to "http/1.1" it will only advertise h1 to 
> clients at tls level, even if h2 is actually available.
> -Andy

Søren Holm

Libwebsockets mailing list
Libwebsockets at ml.libwebsockets.org
CAUTION:This email originated from outside of the organization.
Do not click links or open attachments unless you recognize the sender and know the content is safe.

This message has been scanned for malware by Websense. www.websense.com

More information about the Libwebsockets mailing list