[PATCH] SPDY: fixed shift length of priority

Shigeki Ohtsu ohtsu at iij.ad.jp
Tue Feb 4 05:29:12 UTC 2014


Hi, I've just found a bug in priority of spdy/3.1 as 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

A priority field of 3-bit length is followed by an unused field of
5-bit length in SYN_STREAM.

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;



More information about the nginx-devel mailing list