Roxen.git / server / etc / test / tests / http / RoxenTest_http.pike

version» Context lines:

Roxen.git/server/etc/test/tests/http/RoxenTest_http.pike:12:    7:"No date header",    8:"Bad or no content-length header",    9:"Bad or no last-modified header",    11:"Did not expect headers",    12:"Did not expect data",    13:"Did not expect connection",    14:"Did not expect valid reply",    ]) );   }    - function run( string script, string file, int len, string ... ma ) + function run( string script, string file, int|string ... ma )   {    return lambda() { -  run_pikescript( script, file, (string)len, @ma ); +  run_pikescript( script, file, @((array(string))ma) );    };   }    -  + #define rtest( COMMENT, SCRIPT, FILE, LEN, ARGS...) \ +  atest(COMMENT, run(SCRIPT, FILE, LEN, ARGS), simple_check) +    #define _test( X,Y,Z,Å,Ä,Ö) atest(X+Ä, run(Y,Z,Å,Ö), simple_check )      #define stest( X,Y,Z,Å ) _test( X,Y,Z,Å, "", "1" )   #define stest2( X,Y,Z,Å ) _test( X,Y,Z,Å," (no \\r)", "2" )   #define stest3( X,Y,Z,Å ) _test( X,Y,Z,Å," (1 b packets)", "3" )   #define stest4( X,Y,Z,Å ) _test( X,Y,Z,Å," (10 b packets)", "4" )      #define stest5( X,Y,Z,Å ) _test( X,Y,Z,Å," (1k headers)", "5" )   #define stest6( X,Y,Z,Å ) _test( X,Y,Z,Å," (10k headers)", "6" )   #define stest7( X,Y,Z,Å ) _test( X,Y,Z,Å," (100k headers)", "7" )
Roxen.git/server/etc/test/tests/http/RoxenTest_http.pike:146:       stest11( "HTTP/1.0 /1k.raw", "http/http10.pike", "/1k.raw", 0 );    stest11( "HTTP/1.0 /10k.raw", "http/http10.pike", "/10k.raw", 0 );    stest11( "HTTP/1.0 /", "http/http10.pike", "/", 0 );    stest11( "HTTP/1.0 /nofile", "http/http10.pike", "/nofile", 0 );       // stest4( "HTTP/1.1 /1k.raw", "http/http11.pike", "/1k.raw", 1024 );    // stest4( "HTTP/1.1 /10k.raw", "http/http11.pike", "/10k.raw", 1024*10 );    // stest4( "HTTP/1.1 /", "http/http11.pike", "/", 0 );    // stest4( "HTTP/1.1 /nofile", "http/http11.pike", "/nofile", 0 ); +  +  rtest( "REDIRECT (Host)", "http/http_redirect.pike", +  "/redirect.html", "http://test.example.com/", "Host:test.example.com" ); +  rtest( "REDIRECT (Forwarded)", "http/http_redirect.pike", +  "/redirect.html", "https://test.example.com/", "Host:test2.example.com", +  "Forwarded: host=\"test.example.com\";proto=https"); +  rtest( "REDIRECT (Multi Forwarded)", "http/http_redirect.pike", +  "/redirect.html", "https://test.example.com/", "Host:test2.example.com", +  "Forwarded: host=\"test.example.com\"", +  "Forwarded: host=\"test3.example.com\"", +  "Forwarded: host=\"test4.example.com\";proto=https"); +  rtest( "REDIRECT (Simgle Multi Forwarded)", "http/http_redirect.pike", +  "/redirect.html", "https://test.example.com/", "Host:test2.example.com", +  "Forwarded: host=\"test.example.com\",host=\"test3.example.com\",host=\"test4.example.com\";proto=https"); +  rtest( "REDIRECT (X-Forwarded)", "http/http_redirect.pike", +  "/redirect.html", "https://test.example.com/", "Host:test2.example.com", +  "X-Forwarded-Host: test.example.com", "X-Forwarded-Proto: https");   }