HTTP/2 Issues
Valentin V. Bartenev
vbart at nginx.com
Thu Nov 12 19:13:03 UTC 2015
On Thursday 12 November 2015 19:17:37 Valentin V. Bartenev wrote:
> On Thursday 12 November 2015 00:37:36 DrDinosaur wrote:
> > Hi,
> >
> > I was having a few issues with HTTP/2 requests. Some files and images aren't
> > loading on Chrome. I filed a bug report and documented the issue extensively
> > here: https://code.google.com/p/chromium/issues/detail?id=553282
> >
> > It might just be a Chrome issue, but I want to see if there is also a bug in
> > Nginx or perhaps something I am doing wrong.
> >
> > Here is the output from nginx -V: https://pastebin.com/Xez5hW0k
> >
> > Any information will be helpful. Thanks.
> >
> [..]
>
> Thank you for the report. I've found an issue in the HTTP/2 module.
> Could you try the following patch?
[..]
Sorry, the previous patch breaks building with debug, here's a better one:
diff -r cccef1e939f3 -r 44855eed0a35 src/http/v2/ngx_http_v2_filter_module.c
--- a/src/http/v2/ngx_http_v2_filter_module.c Thu Nov 12 20:45:07 2015 +0300
+++ b/src/http/v2/ngx_http_v2_filter_module.c Thu Nov 12 21:50:06 2015 +0300
@@ -1054,17 +1054,30 @@ static ngx_int_t
ngx_http_v2_headers_frame_handler(ngx_http_v2_connection_t *h2c,
ngx_http_v2_out_frame_t *frame)
{
- ngx_buf_t *buf;
+ ngx_chain_t *cl;
ngx_http_v2_stream_t *stream;
- buf = frame->first->buf;
+ stream = frame->stream;
+ cl = frame->first;
- if (buf->pos != buf->last) {
- return NGX_AGAIN;
+ for ( ;; ) {
+ if (cl->buf->pos != cl->buf->last) {
+ frame->first = cl;
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2:%ui HEADERS frame %p was sent partially",
+ stream->node->id, frame);
+
+ return NGX_AGAIN;
+ }
+
+ if (cl == frame->last) {
+ break;
+ }
+
+ cl = cl->next;
}
- stream = frame->stream;
-
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
"http2:%ui HEADERS frame %p was sent",
stream->node->id, frame);
More information about the nginx
mailing list