# HG changeset patch # User Maxim Dounin # Date 1225627301 -10800 # Node ID d68b85def5219a3de032574e1e55d526c072555e # Parent daa295331acd3962952a22d5c0c55e433ecfaa78 Tests: use 127.0.0.1 instead of localhost. Name 'localhost' is ambiguous if ipv6 present on system. diff --git a/fastcgi.t b/fastcgi.t --- a/fastcgi.t +++ b/fastcgi.t @@ -42,7 +42,7 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location / { @@ -75,7 +75,7 @@ sub fastcgi_daemon { while( $request->Accept() >= 0 ) { $count++; print <new( Proto => 'tcp', - PeerHost => 'localhost:8080' + PeerAddr => '127.0.0.1:8080' ); log_out($request); $s->print($request); diff --git a/lib/Test/Nginx/SMTP.pm b/lib/Test/Nginx/SMTP.pm --- a/lib/Test/Nginx/SMTP.pm +++ b/lib/Test/Nginx/SMTP.pm @@ -22,8 +22,7 @@ sub new { my $self = return $class->SUPER::new( Proto => "tcp", - PeerAddr => "localhost", - PeerPort => 8025, + PeerAddr => "127.0.0.1:8025", @_ ) or die "Can't connect to nginx: $!\n"; diff --git a/memcached.t b/memcached.t --- a/memcached.t +++ b/memcached.t @@ -42,7 +42,7 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location / { diff --git a/proxy-noclose.t b/proxy-noclose.t --- a/proxy-noclose.t +++ b/proxy-noclose.t @@ -52,16 +52,16 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location / { - proxy_pass http://localhost:8081; + proxy_pass http://127.0.0.1:8081; proxy_read_timeout 1s; } location /uselen { - proxy_pass http://localhost:8081; + proxy_pass http://127.0.0.1:8081; # test will wait only 2s for reply, we it will fail if # Content-Length not used as a hint diff --git a/proxy.t b/proxy.t --- a/proxy.t +++ b/proxy.t @@ -41,11 +41,11 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location / { - proxy_pass http://localhost:8081; + proxy_pass http://127.0.0.1:8081; proxy_read_timeout 1s; } } diff --git a/range-flv.t b/range-flv.t --- a/range-flv.t +++ b/range-flv.t @@ -41,7 +41,7 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location / { flv; diff --git a/range.t b/range.t --- a/range.t +++ b/range.t @@ -45,7 +45,7 @@ http { } server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location /t2.html { diff --git a/smtp-greeting-delay.t b/smtp-greeting-delay.t --- a/smtp-greeting-delay.t +++ b/smtp-greeting-delay.t @@ -32,11 +32,11 @@ events { mail { proxy_pass_error_message on; - auth_http http://localhost:8080/mail/auth; + auth_http http://127.0.0.1:8080/mail/auth; xclient off; server { - listen localhost:8025; + listen 127.0.0.1:8025; protocol smtp; smtp_greeting_delay 100ms; } diff --git a/smtp.t b/smtp.t --- a/smtp.t +++ b/smtp.t @@ -39,11 +39,11 @@ events { mail { proxy_pass_error_message on; - auth_http http://localhost:8080/mail/auth; + auth_http http://127.0.0.1:8080/mail/auth; xclient off; server { - listen localhost:8025; + listen 127.0.0.1:8025; protocol smtp; smtp_auth login plain none; } @@ -57,7 +57,7 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location = /mail/auth { diff --git a/ssi-include-big.t b/ssi-include-big.t --- a/ssi-include-big.t +++ b/ssi-include-big.t @@ -45,11 +45,11 @@ http { gzip on; server { - listen localhost:8080; + listen 127.0.0.1:8080; server_name localhost; location /proxy/ { - proxy_pass http://localhost:8080/local/; + proxy_pass http://127.0.0.1:8080/local/; } location = /local/blah { return 204;