# HG changeset patch # User Sergey Kandaurov # Date 1443447662 -10800 # Node ID 3b6ff3b7367d7cfd113036664840d8c4713daeb2 # Parent e3fd2c8d257ed0af1df8bbfecd1a3e5f577d8af8 Tests: fixed multiple header field values representation in h2.t. diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -2597,7 +2597,7 @@ sub hunpack { sub add { my ($h, $n, $v) = @_; return $h->{$n} = $v unless exists $h->{$n}; - $h->{$n} = [ $h->{$n} ]; + $h->{$n} = [ $h->{$n} ] unless ref $h->{$n}; push @{$h->{$n}}, $v; } diff --git a/proxy.t b/proxy.t --- a/proxy.t +++ b/proxy.t @@ -38,7 +38,7 @@ http { server { listen 127.0.0.1:8080; server_name localhost; - +add_header X-Port $remote_port; location / { proxy_pass http://127.0.0.1:8081; proxy_read_timeout 1s; diff --git a/realip.t b/realip.t --- a/realip.t +++ b/realip.t @@ -36,6 +36,7 @@ http { %%TEST_GLOBALS_HTTP%% add_header X-IP $remote_addr; + add_header X-Port $remote_port; set_real_ip_from 127.0.0.1/32; set_real_ip_from 10.0.1.0/24;