Mercurial > hg > nginx
comparison src/http/ngx_http_parse.c @ 5624:bd91f286ee0a
Apply underscores_in_headers also to the first character.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
author | Piotr Sikora <piotr@cloudflare.com> |
---|---|
date | Mon, 24 Mar 2014 16:35:44 -0700 |
parents | 74bfa803a5aa |
children | 3a48775f1535 b5094e26e4e5 |
comparison
equal
deleted
inserted
replaced
5623:d0e75244a18a | 5624:bd91f286ee0a |
---|---|
884 r->lowcase_header[0] = c; | 884 r->lowcase_header[0] = c; |
885 i = 1; | 885 i = 1; |
886 break; | 886 break; |
887 } | 887 } |
888 | 888 |
889 if (ch == '_') { | |
890 if (allow_underscores) { | |
891 hash = ngx_hash(0, ch); | |
892 r->lowcase_header[0] = ch; | |
893 i = 1; | |
894 | |
895 } else { | |
896 r->invalid_header = 1; | |
897 } | |
898 | |
899 break; | |
900 } | |
901 | |
889 if (ch == '\0') { | 902 if (ch == '\0') { |
890 return NGX_HTTP_PARSE_INVALID_HEADER; | 903 return NGX_HTTP_PARSE_INVALID_HEADER; |
891 } | 904 } |
892 | 905 |
893 r->invalid_header = 1; | 906 r->invalid_header = 1; |