diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-01-19 14:54:39 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-01-19 14:54:39 -0800 |
| commit | 7612bf3302eef8a49658eaeca09504be588f6398 (patch) | |
| tree | 42ac2d18d0a081b304abebe8e4bbb083a2b5421b /ext/http-parser/http_parser.c | |
| parent | ba158d8dc6d05db2fc330913d0ab76af1e306055 (diff) | |
| download | infinitytier-7612bf3302eef8a49658eaeca09504be588f6398.tar.gz infinitytier-7612bf3302eef8a49658eaeca09504be588f6398.zip | |
Fix LZ4 warning.
Diffstat (limited to 'ext/http-parser/http_parser.c')
| -rw-r--r-- | ext/http-parser/http_parser.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/http-parser/http_parser.c b/ext/http-parser/http_parser.c index 3c896ffa..895bf0c7 100644 --- a/ext/http-parser/http_parser.c +++ b/ext/http-parser/http_parser.c @@ -1366,12 +1366,7 @@ reexecute: || c != CONTENT_LENGTH[parser->index]) { parser->header_state = h_general; } else if (parser->index == sizeof(CONTENT_LENGTH)-2) { - if (parser->flags & F_CONTENTLENGTH) { - SET_ERRNO(HPE_UNEXPECTED_CONTENT_LENGTH); - goto error; - } parser->header_state = h_content_length; - parser->flags |= F_CONTENTLENGTH; } break; @@ -1474,6 +1469,12 @@ reexecute: goto error; } + if (parser->flags & F_CONTENTLENGTH) { + SET_ERRNO(HPE_UNEXPECTED_CONTENT_LENGTH); + goto error; + } + + parser->flags |= F_CONTENTLENGTH; parser->content_length = ch - '0'; break; |
