Diff for /embedaddon/lighttpd/tests/core-condition.t between versions 1.1.1.1 and 1.1.1.2

version 1.1.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 => 19;use Test::More tests => 21;
 use LightyTest;  use LightyTest;
   
 my $tf = LightyTest->new();  my $tf = LightyTest->new();
Line 65  EOF Line 65  EOF
 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_6" } ];  $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_6" } ];
 ok($tf->handle_http($t) == 0, 'url subdir with path traversal');  ok($tf->handle_http($t) == 0, 'url subdir with path traversal');
   
   $t->{REQUEST}  = ( <<EOF
   GET / HTTP/1.0
   EOF
    );
   $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Server' => 'Apache 1.3.29' } ];
   ok($tf->handle_http($t) == 0, 'condition: handle if before else branches');
   
   $t->{REQUEST}  = ( <<EOF
   GET /show/other/server-tag HTTP/1.0
   EOF
    );
   $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Server' => 'special tag' } ];
   ok($tf->handle_http($t) == 0, 'condition: handle if before else branches #2');
   
 ok($tf->stop_proc == 0, "Stopping lighttpd");  ok($tf->stop_proc == 0, "Stopping lighttpd");
   
 $tf->{CONFIGFILE} = 'lighttpd.conf';  $tf->{CONFIGFILE} = 'lighttpd.conf';
Line 152  $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'H Line 166  $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'H
 ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: foobar');  ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: foobar');
   
 ok($tf->stop_proc == 0, "Stopping lighttpd");  ok($tf->stop_proc == 0, "Stopping lighttpd");
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>