diff options
Diffstat (limited to 'user/nginx/http2-buffer-management.patch')
-rw-r--r-- | user/nginx/http2-buffer-management.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/user/nginx/http2-buffer-management.patch b/user/nginx/http2-buffer-management.patch new file mode 100644 index 000000000..e77b91feb --- /dev/null +++ b/user/nginx/http2-buffer-management.patch @@ -0,0 +1,43 @@ +Source: https://trac.nginx.org/nginx/changeset/ea1f29c2010cda4940b741976f103d547308815a/nginx + +This patch was modified from upstream in the following way(s): + +* Update path so that the patch applies correctly +* dos2unix + +Index: src/http/v2/ngx_http_v2.c +=================================================================== +--- a/src/http/v2/ngx_http_v2.c (revision 9165) ++++ b/src/http/v2/ngx_http_v2.c (revision 9179) +@@ -387,11 +387,9 @@ + ngx_http_v2_module); + +- available = h2mcf->recv_buffer_size - 2 * NGX_HTTP_V2_STATE_BUFFER_SIZE; ++ available = h2mcf->recv_buffer_size - NGX_HTTP_V2_STATE_BUFFER_SIZE; + + do { + p = h2mcf->recv_buffer; +- +- ngx_memcpy(p, h2c->state.buffer, NGX_HTTP_V2_STATE_BUFFER_SIZE); +- end = p + h2c->state.buffer_used; ++ end = ngx_cpymem(p, h2c->state.buffer, h2c->state.buffer_used); + + n = c->recv(c, end, available); +@@ -2593,5 +2591,5 @@ + } + +- ngx_memcpy(h2c->state.buffer, pos, NGX_HTTP_V2_STATE_BUFFER_SIZE); ++ ngx_memcpy(h2c->state.buffer, pos, size); + + h2c->state.buffer_used = size; +Index: src/http/v2/ngx_http_v2_module.c +=================================================================== +--- a/src/http/v2/ngx_http_v2_module.c (revision 9121) ++++ b/src/http/v2/ngx_http_v2_module.c (revision 9179) +@@ -389,5 +389,5 @@ + size_t *sp = data; + +- if (*sp <= 2 * NGX_HTTP_V2_STATE_BUFFER_SIZE) { ++ if (*sp <= NGX_HTTP_V2_STATE_BUFFER_SIZE) { + return "value is too small"; + } |