diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-07-03 15:18:16 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-07-03 15:18:16 +0300 |
commit | 11cecce11401a0c8990279406de3894c036c73a7 (patch) | |
tree | 700434ed6d637f538636b53a792055b70756ac10 /src/nxt_http_parse.c | |
parent | 0366bfad6de29d5b40894233f6c5be7d08118826 (diff) | |
download | unit-11cecce11401a0c8990279406de3894c036c73a7.tar.gz unit-11cecce11401a0c8990279406de3894c036c73a7.tar.bz2 |
HTTP parser: relaxed checking of fields values.
Allowing characters up to 0xFF doesn't conflict with RFC 7230.
Particularly, this make it possible to pass unencoded UTF-8 data
through HTTP headers, which can be useful.
Diffstat (limited to 'src/nxt_http_parse.c')
-rw-r--r-- | src/nxt_http_parse.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c index b9325c57..34eaaaf9 100644 --- a/src/nxt_http_parse.c +++ b/src/nxt_http_parse.c @@ -699,8 +699,7 @@ nxt_http_lookup_field_end(u_char *p, u_char *end) #define nxt_field_end_test_char(ch) \ \ - /* Values below 0x20 become more than 0xDF. */ \ - if (nxt_slow_path((u_char) ((ch) - 0x20) > 0x5E)) { \ + if (nxt_slow_path((ch) < 0x20)) { \ return &(ch); \ } |