summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:36 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:36 +0300
commitdab1b086ef6702811196f317b39623ad81eac505 (patch)
tree4b09c641a7dd4e012b7174d1641a8b9942e207e2 /src
parentfcf4331a0fdaf620a75fc62ce9d31b1295db3b3c (diff)
downloadnginx-dab1b086ef6702811196f317b39623ad81eac505.tar.gz
nginx-dab1b086ef6702811196f317b39623ad81eac505.tar.bz2
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".
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/perl/nginx.xs22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs
index e2180e6cf..9e8a6a5ce 100644
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -304,29 +304,11 @@ header_in(r, key)
if (hh->offset == offsetof(ngx_http_headers_in_t, cookie)) {
sep = ';';
- goto multi;
- }
-#if (NGX_HTTP_X_FORWARDED_FOR)
- if (hh->offset == offsetof(ngx_http_headers_in_t, x_forwarded_for)) {
- 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;
+ } else {
+ sep = ',';
}
- XSRETURN_UNDEF;
-
- multi:
-
- /* Cookie, X-Forwarded-For */
-
ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
if (*ph == NULL) {