<div dir="ltr">I'm sorry to say that the patch does not make a difference.<div><br><div>I collected Chrome's http/2 trace for a post to a non-existant url:</div><div><a href="https://gist.github.com/oschaaf/da273f96fad5e22890981fcd4a1a4376">https://gist.github.com/oschaaf/da273f96fad5e22890981fcd4a1a4376</a></div><div><br></div><div>I'm wondering about that last HTTP2_SESSION_RST_STREAM entry.. it looks like </div><div>the httpv2 mod wants to cancel the incoming post data stream at an odd point in time?</div><div>But I'm no expert, so I'm not sure at all.</div><div><br></div><div><div>Otto<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 2:44 PM, Otto van der Schaaf <span dir="ltr"><<a href="mailto:oschaaf@we-amp.com" target="_blank">oschaaf@we-amp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I'm pretty sure these logs correlate to the problems I am seeing, yes.<div>Indeed the error.log samples are free from warnings and errors, but it seems the protocol is violated nevertheless. At least Chrome says so. So the client does report an error afaict.</div><div>I'll patch in the change you posted and let you know how that goes, thanks.</div><span class=""><font color="#888888"><div><br></div><div>Otto</div></font></span><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 2:34 PM, Валентин Бартенев <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>On Wednesday 13 April 2016 15:30:39 Валентин Бартенев wrote:<br>
> On Wednesday 13 April 2016 13:54:24 Otto van der Schaaf wrote:<br>
> > Sure.<br>
> ><br>
> > - This sample contains to or three requests, the last request is where rate<br>
> > limiting kicks in and the protocol error happens (the earlier requests are<br>
> > problem-free):<br>
> > <a href="https://gist.github.com/oschaaf/281b7a0fed9954dd960adac55e96f2cd" rel="noreferrer" target="_blank">https://gist.github.com/oschaaf/281b7a0fed9954dd960adac55e96f2cd</a><br>
> ><br>
> > - This is from a post to a non-existant url:<br>
> > <a href="https://gist.github.com/oschaaf/6396a614ce599d5003e50bb8e7106bed" rel="noreferrer" target="_blank">https://gist.github.com/oschaaf/6396a614ce599d5003e50bb8e7106bed</a><br>
> ><br>
> [..]<br>
><br>
> Are you sure that you saw this problem while were collecting the logs?<br>
> There's nothing suspicious in them, and no errors are reported by nginx<br>
> and by the client.<br>
><br>
> The only problem that I could see should be fixed by the patch below.<br>
> Please try it and let me know if it will help.<br>
><br>
> wbr, Valentin V. Bartenev<br>
><br>
><br>
> # HG changeset patch<br>
> # User Valentin Bartenev <<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>><br>
> # Date 1460529455 -10800<br>
> # Wed Apr 13 09:37:35 2016 +0300<br>
> # Node ID 80d0c9e314f62b594e634cd9318fe84afc50bb2c<br>
> # Parent 640288d0e1bc449a54ac1c85905e6fce780fac7d<br>
> HTTP/2: refuse streams with data until SETTINGS is acknowledged.<br>
><br>
> A client can start sending data before receiving and acknowledging<br>
> the SETTINGS frame, thus having a wrong idea about the stream's<br>
> initial window. This can violate flow control.<br>
><br>
</div></div>[..]<br>
<br>
Sorry, automatic word wrapping broke the patch.<br>
<br>
Here is another attempt:<br>
<div><div><br>
# HG changeset patch<br>
# User Valentin Bartenev <<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>><br>
# Date 1460529455 -10800<br>
# Wed Apr 13 09:37:35 2016 +0300<br>
# Node ID 80d0c9e314f62b594e634cd9318fe84afc50bb2c<br>
# Parent 640288d0e1bc449a54ac1c85905e6fce780fac7d<br>
HTTP/2: refuse streams with data until SETTINGS is acknowledged.<br>
<br>
A client can start sending data before receiving and acknowledging<br>
the SETTINGS frame, thus having a wrong idea about the stream's<br>
initial window. This can violate flow control.<br>
<br>
diff -r 640288d0e1bc -r 80d0c9e314f6 src/http/v2/ngx_http_v2.c<br>
--- a/src/http/v2/ngx_http_v2.c Tue Apr 12 19:01:56 2016 +0300<br>
+++ b/src/http/v2/ngx_http_v2.c Wed Apr 13 09:37:35 2016 +0300<br>
@@ -1071,6 +1071,19 @@ ngx_http_v2_state_headers(ngx_http_v2_co<br>
return ngx_http_v2_state_header_block(h2c, pos, end);<br>
}<br>
<br>
+ if (!h2c->settings_ack && !(h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG))<br>
+ {<br>
+ if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid,<br>
+ NGX_HTTP_V2_REFUSED_STREAM)<br>
+ != NGX_OK)<br>
+ {<br>
+ return ngx_http_v2_connection_error(h2c,<br>
+ NGX_HTTP_V2_INTERNAL_ERROR);<br>
+ }<br>
+<br>
+ return ngx_http_v2_state_header_block(h2c, pos, end);<br>
+ }<br>
+<br>
node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 1);<br>
<br>
if (node == NULL) {<br>
@@ -1883,7 +1896,7 @@ ngx_http_v2_state_settings(ngx_http_v2_c<br>
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);<br>
}<br>
<br>
- /* TODO settings acknowledged */<br>
+ h2c->settings_ack = 1;<br>
<br>
return ngx_http_v2_state_complete(h2c, pos, end);<br>
}<br>
diff -r 640288d0e1bc -r 80d0c9e314f6 src/http/v2/ngx_http_v2.h<br>
--- a/src/http/v2/ngx_http_v2.h Tue Apr 12 19:01:56 2016 +0300<br>
+++ b/src/http/v2/ngx_http_v2.h Wed Apr 13 09:37:35 2016 +0300<br>
@@ -141,6 +141,7 @@ struct ngx_http_v2_connection_s {<br>
ngx_uint_t last_sid;<br>
<br>
unsigned closed_nodes:8;<br>
+ unsigned settings_ack:1;<br>
unsigned blocked:1;<br>
};<br>
<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org" target="_blank">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a></div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div></div></div>