mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Perl: all known input headers are handled identically.
As all known input headers are now linked lists, these are now handled identically. In particular, this makes it possible to access properly combined values of headers not specifically handled previously, such as "Via" or "Connection".
This commit is contained in:
parent
fcf4331a0f
commit
dab1b086ef
@ -304,28 +304,10 @@ header_in(r, key)
|
|||||||
|
|
||||||
if (hh->offset == offsetof(ngx_http_headers_in_t, cookie)) {
|
if (hh->offset == offsetof(ngx_http_headers_in_t, cookie)) {
|
||||||
sep = ';';
|
sep = ';';
|
||||||
goto multi;
|
|
||||||
}
|
} else {
|
||||||
#if (NGX_HTTP_X_FORWARDED_FOR)
|
|
||||||
if (hh->offset == offsetof(ngx_http_headers_in_t, x_forwarded_for)) {
|
|
||||||
sep = ',';
|
sep = ',';
|
||||||
goto multi;
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
|
|
||||||
|
|
||||||
if (*ph) {
|
|
||||||
ngx_http_perl_set_targ((*ph)->value.data, (*ph)->value.len);
|
|
||||||
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
XSRETURN_UNDEF;
|
|
||||||
|
|
||||||
multi:
|
|
||||||
|
|
||||||
/* Cookie, X-Forwarded-For */
|
|
||||||
|
|
||||||
ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
|
ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user