Branch: Tag:

2001-02-01

2001-02-01 06:35:49 by Per Hedbor <ph@opera.com>

Test some HTTP stuff

Rev: server/etc/test/tests/http/RoxenTest_http.pike:1.1
Rev: server/etc/test/tests/http/http09.pike:1.1
Rev: server/etc/test/tests/http/http10.pike:1.1
Rev: server/etc/test/tests/http/http_common.pike:1.1

1: + inherit "http_common";    -  + void main(int argc, array argv) + { +  if( argc != 4 ) exit( BADARG ); +  +  Stdio.File f = connect( argv[1] ); +  +  f->write( "GET "+argv[2]+" HTTP/1.0\r\n" +  "User-Agent: testcript\r\n" +  "\r\n" ); +  +  string _d = f->read(); +  +  array q = _d/"\r\n\r\n"; +  if( sizeof( q ) < 2 ) +  exit( BADHEADERS ); +  +  verify_headers( q[0], strlen(q[1]) ); +  +  if( (int)argv[3] ) +  if( q[1] != ("\0" * (int)argv[3]) ) +  exit( BADDATA ); +  +  exit( OK ); + }   Newline at end of file added.