RE: mod_http2 / H2WindowSize default
> -Original Message- > From: Yann Ylavic [mailto:ylavic@gmail.com] > Sent: dinsdag 17 november 2015 00:49 > To: httpd-dev <dev@httpd.apache.org> > Subject: Re: mod_http2 / H2WindowSize default > > On Mon, Nov 16, 2015 at 8:23 PM, Bert Huijben <b...@qqmail.nl> wrote: > > > > Currently it looks like bodies of requests are not delivered over http/2 > unless I add a Content-Length header to the request. > > Do you mean it does not work with the "Transfer-Encoding: chunked" > header either? Not following up on this: http/2 strictly disallows transfer-encoding chunked. http/2 always uses streams and framing... completely different system, but solves the same problem as chunking did in http/1.1. If a content-length header exists, it is transferred... but it isn't used at the protocol level. (In most cases it is still used at the application level, but that is a different story) Bert
Re: mod_http2 / H2WindowSize default
Hmm, I have test cases with uploads without content-length, but those included a content-type... Ok, adding a POST lacking both triggers the misbehaviour. Working on a fix... //Stefan > Am 16.11.2015 um 20:23 schrieb Bert Huijben <b...@qqmail.nl>: > >> -Original Message- >> From: Stefan Eissing [mailto:stefan.eiss...@greenbytes.de] >> Sent: maandag 16 november 2015 12:41 >> To: dev@httpd.apache.org >> Subject: Re: mod_http2 / H2WindowSize default >> >> >>> Am 14.11.2015 um 11:14 schrieb Bert Huijben <b...@qqmail.nl>: >>> >>>Hi, >>> >>> I was wondering why mod_http2 currently uses a default window size of >> 65536. >> >> Pure mistake on my part. I put this in almost at the start of development and >> never reviewed this. >> >> Thanks for catching it. I am just about to commit a change that >> a) set the default to 65535 >> b) will not send a setting for it to the client unless it has been >> configured to >> have another value >> >> I also removed the sending of the MAX_HEADER_LIST_SIZE, since it is not >> enforced in any way currently. >> >> Hope this change works for you. > > Thanks, > > Those settings are enforced in (my) Serf implementation now, so my code will > see a difference. Thanks for fixing. > (BTW: It is very easy to spot these two if you run nghttp2 in verbose mode > against httpd). > > > As my http2 implementation in serf is coming closer to full-featured I'm > trying to exercise more and more things in httpd 2.4.17. > > Currently it looks like bodies of requests are not delivered over http/2 > unless I add a Content-Length header to the request. > > > Serf is a client that is eager to use chunked encoding over http/1, so by > default it won't send such a header. And in http/2 this header is fully > optional as the existence of a body on a request is already available with a > flag on the headers frame. > > I would love to see this fixed soon, as this is currently a blocker for me to > start testing Subversion over http/2. > > Bert
Re: mod_http2 / H2WindowSize default
Fixed in r1714751. > Am 17.11.2015 um 11:16 schrieb Stefan Eissing <stefan.eiss...@greenbytes.de>: > > Hmm, I have test cases with uploads without content-length, but those > included a content-type... > > Ok, adding a POST lacking both triggers the misbehaviour. Working on a fix... > > //Stefan > >> Am 16.11.2015 um 20:23 schrieb Bert Huijben <b...@qqmail.nl>: >> >>> -Original Message- >>> From: Stefan Eissing [mailto:stefan.eiss...@greenbytes.de] >>> Sent: maandag 16 november 2015 12:41 >>> To: dev@httpd.apache.org >>> Subject: Re: mod_http2 / H2WindowSize default >>> >>> >>>> Am 14.11.2015 um 11:14 schrieb Bert Huijben <b...@qqmail.nl>: >>>> >>>> Hi, >>>> >>>> I was wondering why mod_http2 currently uses a default window size of >>> 65536. >>> >>> Pure mistake on my part. I put this in almost at the start of development >>> and >>> never reviewed this. >>> >>> Thanks for catching it. I am just about to commit a change that >>> a) set the default to 65535 >>> b) will not send a setting for it to the client unless it has been >>> configured to >>> have another value >>> >>> I also removed the sending of the MAX_HEADER_LIST_SIZE, since it is not >>> enforced in any way currently. >>> >>> Hope this change works for you. >> >> Thanks, >> >> Those settings are enforced in (my) Serf implementation now, so my code will >> see a difference. Thanks for fixing. >> (BTW: It is very easy to spot these two if you run nghttp2 in verbose mode >> against httpd). >> >> >> As my http2 implementation in serf is coming closer to full-featured I'm >> trying to exercise more and more things in httpd 2.4.17. >> >> Currently it looks like bodies of requests are not delivered over http/2 >> unless I add a Content-Length header to the request. >> >> >> Serf is a client that is eager to use chunked encoding over http/1, so by >> default it won't send such a header. And in http/2 this header is fully >> optional as the existence of a body on a request is already available with a >> flag on the headers frame. >> >> I would love to see this fixed soon, as this is currently a blocker for me >> to start testing Subversion over http/2. >> >> Bert >
RE: mod_http2 / H2WindowSize default
> -Original Message- > From: Stefan Eissing [mailto:stefan.eiss...@greenbytes.de] > Sent: maandag 16 november 2015 12:41 > To: dev@httpd.apache.org > Subject: Re: mod_http2 / H2WindowSize default > > > > Am 14.11.2015 um 11:14 schrieb Bert Huijben <b...@qqmail.nl>: > > > > Hi, > > > > I was wondering why mod_http2 currently uses a default window size of > 65536. > > Pure mistake on my part. I put this in almost at the start of development and > never reviewed this. > > Thanks for catching it. I am just about to commit a change that > a) set the default to 65535 > b) will not send a setting for it to the client unless it has been configured > to > have another value > > I also removed the sending of the MAX_HEADER_LIST_SIZE, since it is not > enforced in any way currently. > > Hope this change works for you. Thanks, Those settings are enforced in (my) Serf implementation now, so my code will see a difference. Thanks for fixing. (BTW: It is very easy to spot these two if you run nghttp2 in verbose mode against httpd). As my http2 implementation in serf is coming closer to full-featured I'm trying to exercise more and more things in httpd 2.4.17. Currently it looks like bodies of requests are not delivered over http/2 unless I add a Content-Length header to the request. Serf is a client that is eager to use chunked encoding over http/1, so by default it won't send such a header. And in http/2 this header is fully optional as the existence of a body on a request is already available with a flag on the headers frame. I would love to see this fixed soon, as this is currently a blocker for me to start testing Subversion over http/2. Bert
Re: mod_http2 / H2WindowSize default
On Mon, Nov 16, 2015 at 8:23 PM, Bert Huijbenwrote: > > Currently it looks like bodies of requests are not delivered over http/2 > unless I add a Content-Length header to the request. Do you mean it does not work with the "Transfer-Encoding: chunked" header either? Regards, Yann.
Re: mod_http2 / H2WindowSize default
> Am 14.11.2015 um 11:14 schrieb Bert Huijben: > > Hi, > > I was wondering why mod_http2 currently uses a default window size of 65536. Pure mistake on my part. I put this in almost at the start of development and never reviewed this. Thanks for catching it. I am just about to commit a change that a) set the default to 65535 b) will not send a setting for it to the client unless it has been configured to have another value I also removed the sending of the MAX_HEADER_LIST_SIZE, since it is not enforced in any way currently. Hope this change works for you. Cheers, Stefan > > The http2 protocol defines a default window size of 65535, just 1 byte less > than the current default. Changing the default requires transferring this > setting to every client in the initial settings frame, while sticking to > 65535 would allow not doing that. > > I can imagine that a completely different default makes sense (and allowing > to configure this certainly does), but this 1 byte of the protocol default > doesn’t make much sense to me. > > This is just 6 bytes wasted in the handshake for no obvious benefit. > > > I would recommend changing the default to 65535 or perhaps to something > completely different. (1MB… Don’t know). But sending a setting that is less > than 0.002% off the protocol default doesn’t make much sense to me. > > > Note that this size is not really used by httpd itself. This size is used by > clients that need to transfer request bodies to httpd. This number of bytes > specifies the maximum number of bytes the client is allowed to send before it > needs to receive a WINDOW_UPDATE from the server, allowing it to transfer > more data. > > The client determines the default in the other direction. > > > Bert