[nginx] SPDY: fixed parsing of http version.

Maxim Dounin mdounin at mdounin.ru
Tue Feb 11 18:32:28 UTC 2014


details:   http://hg.nginx.org/nginx/rev/cff36d2d7fe6
branches:  
changeset: 5574:cff36d2d7fe6
user:      Xiaochen Wang <wangxiaochen0 at gmail.com>
date:      Tue Feb 11 20:54:16 2014 +0800
description:
SPDY: fixed parsing of http version.

There is an error while parsing multi-digit minor version numbers (e.g.
"HTTP/1.10").

diffstat:

 src/http/ngx_http_spdy.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -2794,6 +2794,10 @@ ngx_http_spdy_parse_version(ngx_http_req
 
         ch = *p;
 
+        if (ch == '.') {
+            break;
+        }
+
         if (ch < '0' || ch > '9') {
             return NGX_HTTP_PARSE_INVALID_REQUEST;
         }



More information about the nginx-devel mailing list