搜索
您的当前位置:首页正文

http header横杆被替换的原因

来源:知库网

个人博客迁移

if (ch == '_') {

if (allow_underscores) {

hash = ngx_hash(hash, ch);

r->lowcase_header[i++] = ch;

i &= (NGX_HTTP_LC_HEADER_LEN - 1);

} else {

r->invalid_header = 1;

}break;}

nginx对headername的字符做了限制,默认 underscores_in_headers 为off,表示如果headername中包含下划线,则忽略掉。

Top