]> git.kaiwu.me - nginx.git/commitdiff
SPDY: fixed parsing of http version.
authorXiaochen Wang <wangxiaochen0@gmail.com>
Tue, 11 Feb 2014 12:54:16 +0000 (20:54 +0800)
committerXiaochen Wang <wangxiaochen0@gmail.com>
Tue, 11 Feb 2014 12:54:16 +0000 (20:54 +0800)
There is an error while parsing multi-digit minor version numbers (e.g.
"HTTP/1.10").

src/http/ngx_http_spdy.c

index 20755f490679837887fa71ed1c578bd2e003a4f0..b5bfe186021d067af76f029fc1d6d7bb825d4140 100644 (file)
@@ -2794,6 +2794,10 @@ ngx_http_spdy_parse_version(ngx_http_request_t *r)
 
         ch = *p;
 
+        if (ch == '.') {
+            break;
+        }
+
         if (ch < '0' || ch > '9') {
             return NGX_HTTP_PARSE_INVALID_REQUEST;
         }