SPDY: fixed parsing of http version

Maxim Dounin mdounin at mdounin.ru
Tue Feb 11 18:33:03 UTC 2014


Hello!

On Tue, Feb 11, 2014 at 09:38:27PM +0800, Xiaochen Wang wrote:

> # HG changeset patch
> # User Xiaochen Wang <wangxiaochen0 at gmail.com>
> # Date 1392123256 -28800
> # Node ID d8d499624b0941a989e43538ac33aead31d55efb
> # Parent  eeb3c27191471471ff8c3853d847399264498463
> SPDY: fixed parsing of http version
> 
> There is an error while parsing multi-digit minor version numbers (e.g. "HTTP/1.10").
> 
> diff -r eeb3c2719147 -r d8d499624b09 src/http/ngx_http_spdy.c
> --- a/src/http/ngx_http_spdy.c	Tue Feb 04 17:13:35 2014 +0400
> +++ b/src/http/ngx_http_spdy.c	Tue Feb 11 20:54:16 2014 +0800
> @@ -2794,6 +2794,10 @@
>  
>          ch = *p;
>  
> +        if (ch == '.') {
> +            break;
> +        }
> +
>          if (ch < '0' || ch > '9') {
>              return NGX_HTTP_PARSE_INVALID_REQUEST;
>          }

Committed (with minor changes to commit log), thanks.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list