diff options
Diffstat (limited to 'http_parser.rl')
-rw-r--r-- | http_parser.rl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/http_parser.rl b/http_parser.rl index 9f848b0..0685d27 100644 --- a/http_parser.rl +++ b/http_parser.rl @@ -112,7 +112,11 @@ static char *skip_header(struct mog_http *http, char *buf, const char *pe) } eor @ { http->_p.has_range = 1; }; transfer_encoding_chunked = "Transfer-Encoding:"i sep - "chunked"i eor > { http->_p.chunked = 1; }; + # XXX we don't know how to deal with "gzip", "deflate", or + # "compress" as described in RFC 7230, so reject them, here. + "chunked"i + $! { errno = EINVAL; fbreak; } + eor @ { http->_p.chunked = 1; }; trailer = "Trailer:"i sep (("Content-MD5"i @ { http->_p.has_md5 = 1; }) | header_name | ',') |