Mercurial > hg > nginx
comparison src/http/ngx_http_spdy.c @ 5574:cff36d2d7fe6
SPDY: fixed parsing of http version.
There is an error while parsing multi-digit minor version numbers (e.g.
"HTTP/1.10").
author | Xiaochen Wang <wangxiaochen0@gmail.com> |
---|---|
date | Tue, 11 Feb 2014 20:54:16 +0800 |
parents | 60c4179f76ad |
children | a9116d9b63f9 |
comparison
equal
deleted
inserted
replaced
5573:7c05f6590753 | 5574:cff36d2d7fe6 |
---|---|
2792 | 2792 |
2793 for (p += 6; p != r->header_end - 2; p++) { | 2793 for (p += 6; p != r->header_end - 2; p++) { |
2794 | 2794 |
2795 ch = *p; | 2795 ch = *p; |
2796 | 2796 |
2797 if (ch == '.') { | |
2798 break; | |
2799 } | |
2800 | |
2797 if (ch < '0' || ch > '9') { | 2801 if (ch < '0' || ch > '9') { |
2798 return NGX_HTTP_PARSE_INVALID_REQUEST; | 2802 return NGX_HTTP_PARSE_INVALID_REQUEST; |
2799 } | 2803 } |
2800 | 2804 |
2801 r->http_major = r->http_major * 10 + ch - '0'; | 2805 r->http_major = r->http_major * 10 + ch - '0'; |