[PATCH] SPDY: fixed shift length of priority
Valentin V. Bartenev
vbart at nginx.com
Tue Feb 4 11:02:43 UTC 2014
On Tuesday 04 February 2014 14:29:12 Shigeki Ohtsu wrote:
> Hi, I've just found a bug in priority of spdy/3.1 as below.
Nice catch, thank you.
It is committed with a modified commit message:
http://hg.nginx.org/nginx/rev/60c4179f76ad
See also some notes below.
>
> This is the first time for me to submit a patch to nginx, so
> please let me know if it is wrong to do it.
>
> # HG changeset patch
> # User Shigeki Ohtsu <ohtsu at iij.ad.jp>
> # Date 1391490383 -32400
> # Tue Feb 04 14:06:23 2014 +0900
> # Node ID 431ac513def9f6d51442222269ec17e90ddd8473
> # Parent 02ec169f683f090902eef1df95903ef3b8558c12
> SPDY: fixed shift length of priority
Summary line must be ended with a dot.
See also: http://nginx.org/en/docs/contributing_changes.html
>
> A priority field of 3-bit length is followed by an unused field of
> 5-bit length in SYN_STREAM.
I would rather mention that it is introduced by switching to spdy/3.1.
>
> diff -r 02ec169f683f -r 431ac513def9 src/http/ngx_http_spdy.c
> --- a/src/http/ngx_http_spdy.c Tue Feb 04 07:45:33 2014 +0400
> +++ b/src/http/ngx_http_spdy.c Tue Feb 04 14:06:23 2014 +0900
> @@ -902,7 +902,7 @@
> sc->length -= NGX_SPDY_SYN_STREAM_SIZE;
>
> sid = ngx_spdy_frame_parse_sid(pos);
> - prio = pos[8] >> 6;
> + prio = pos[8] >> 5;
>
> pos += NGX_SPDY_SYN_STREAM_SIZE;
>
Your email client broke the patch.
It's recommended to use mercurial patchbomb extension:
http://mercurial.selenic.com/wiki/PatchbombExtension
wbr, Valentin V. Bartenev
More information about the nginx-devel
mailing list