version 1.1, 2013/10/14 10:32:47
|
version 1.1.1.2, 2016/11/02 10:35:00
|
Line 8 BEGIN {
|
Line 8 BEGIN {
|
|
|
use strict; |
use strict; |
use IO::Socket; |
use IO::Socket; |
use Test::More tests => 12; | use Test::More tests => 14; |
use LightyTest; |
use LightyTest; |
|
|
my $tf = LightyTest->new(); |
my $tf = LightyTest->new(); |
Line 85 EOF
|
Line 85 EOF
|
); |
); |
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/dummydir/?foo' } ]; |
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/dummydir/?foo' } ]; |
ok($tf->handle_http($t) == 0, 'internal redirect in directory + querystring'); |
ok($tf->handle_http($t) == 0, 'internal redirect in directory + querystring'); |
|
|
|
$t->{REQUEST} = ( <<EOF |
|
GET /~test%20ä_ HTTP/1.0 |
|
EOF |
|
); |
|
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/~test%20%c3%a4_/' } ]; |
|
ok($tf->handle_http($t) == 0, 'internal redirect in directory with special characters'); |
|
|
|
$t->{REQUEST} = ( <<EOF |
|
GET /~test%20ä_?foo HTTP/1.0 |
|
EOF |
|
); |
|
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/~test%20%c3%a4_/?foo' } ]; |
|
ok($tf->handle_http($t) == 0, 'internal redirect in directory with special characters + querystring'); |
|
|
## simple-vhost |
## simple-vhost |
|
|