You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2002/04/09 18:30:45 UTC

cvs commit: tcl-websh/src/apachetests/apachetest template.conf.tcl

ronnie      02/04/09 09:30:45

  Modified:    src/apachetests headers.test mod_websh.test runtests.tcl
               src/apachetests/apachetest template.conf.tcl
  Added:       src/apachetests mime.types
  Log:
  - made all tests work for Apache 1.3 and Apache 2.0
  
  Revision  Changes    Path
  1.4       +35 -19    tcl-websh/src/apachetests/headers.test
  
  Index: headers.test
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/headers.test,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- headers.test	18 Mar 2002 22:11:28 -0000	1.3
  +++ headers.test	9 Apr 2002 16:30:45 -0000	1.4
  @@ -1,4 +1,4 @@
  -# $Id: headers.test,v 1.3 2002/03/18 22:11:28 davidw Exp $
  +# $Id: headers.test,v 1.4 2002/04/09 16:30:45 ronnie Exp $
   
   # test interp pools
   
  @@ -6,24 +6,40 @@
   
   ::tcltest::test header-1.1 {websh header test} {
       apachetest::start {} {
  -	set page [ ::http::geturl "${urlbase}$testfilename1" ]
  -    }
  -    upvar 0 $page state
  -    array set meta $state(meta)
  -    array get meta
  -} {HTTP/1.1 200 OK   Date: Wed, 06 Mar 2002 17:44:15 GMT
  ->     Server: Apache/1.3.12 (Unix)
  ->     Foo: bar
  ->     Foo: bla
  ->     Foo: que
  ->     Header1: bar
  ->     Header2: Foo
  ->     Header2: Bar
  ->     Generator: websh3.50 (c) Netcetera AG, http://netcetera.ch
  ->     Connection: close
  ->     Content-Type: text/html
  -> 
  ->     hi world
  +	### fixme: this can't work, because state doesn't handle
  +	### multiple headers correctly anyway ...
  +	#set page [ ::http::geturl "${urlbase}$testfilename1" ]
   
  +	# other approach (connect directly)
  +	set s [socket $host $port]
  +	puts $s "GET /$testfilename1 HTTP/1.0"
  +	puts $s ""
  +	flush $s
  +	set page ""
  +	set count 0
  +	while {![eof $s]} {
  +	    set line [gets $s]
  +	    if {![regexp "^(Server|Generator|Date|Content-Length): .*" $line]} {
  +		append page $line\n
  +	    }
  +	}
  +	close $s
  +    }
  +    ### fixme: this can't work, because state doesn't handle
  +    ### multiple headers correctly anyway ...
  +    # upvar 0 $page state
  +    #array set meta $state(meta)
  +    #array get meta
  +    set page
  +} {HTTP/1.1 200 OK
  +Foo: bar
  +Foo: bla
  +Foo: que
  +Header1: bar
  +Header2: Foo
  +Header2: Bar
  +Connection: close
  +Content-Type: text/html
   
  +hi world
   }
  
  
  
  1.6       +5 -2      tcl-websh/src/apachetests/mod_websh.test
  
  Index: mod_websh.test
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/mod_websh.test,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_websh.test	18 Mar 2002 22:11:28 -0000	1.5
  +++ mod_websh.test	9 Apr 2002 16:30:45 -0000	1.6
  @@ -6,9 +6,12 @@
   
   # See README file for more information.
   
  -# $Id: mod_websh.test,v 1.5 2002/03/18 22:11:28 davidw Exp $
  +# $Id: mod_websh.test,v 1.6 2002/04/09 16:30:45 ronnie Exp $
   
  -set urlbase "http://localhost:8081/"
  +set host localhost
  +set port 8081
  +
  +set urlbase "http://$host:$port/"
   
   package require tcltest
   package require http
  
  
  
  1.6       +2 -7      tcl-websh/src/apachetests/runtests.tcl
  
  Index: runtests.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/runtests.tcl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- runtests.tcl	18 Mar 2002 22:11:28 -0000	1.5
  +++ runtests.tcl	9 Apr 2002 16:30:45 -0000	1.6
  @@ -7,14 +7,9 @@
   apachetest::getbinname $argv
   
   apachetest::makeconf server.conf {
  -    LoadModule websh_module [file join $CWD .. unix "mod_websh3.10[info sharedlibextension]"]
  -    <IfModule mod_mime.c>
  -    AddLanguage en .en
  -    AddLanguage it .it
  -    AddLanguage es .es
  -    AddLanguage de .de
  +    LoadModule websh_module [file join $CWD .. unix "mod_websh3.50[info sharedlibextension]"]
       AddHandler websh .ws3
  -    </IfModule>
  +
   }
   
   # we do this to keep tcltest happy - it reads argv...
  
  
  
  1.1                  tcl-websh/src/apachetests/mime.types
  
  Index: mime.types
  ===================================================================
  # This is a comment. I love comments.
  application/pdf			pdf
  
  
  
  1.2       +5 -3      tcl-websh/src/apachetests/apachetest/template.conf.tcl
  
  Index: template.conf.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/apachetest/template.conf.tcl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- template.conf.tcl	18 Mar 2002 22:11:28 -0000	1.1
  +++ template.conf.tcl	9 Apr 2002 16:30:45 -0000	1.2
  @@ -7,8 +7,8 @@
   
   PidFile "$CWD/httpd.pid"
   
  -ResourceConfig "$CWD/srm.conf"
  -AccessConfig "$CWD/access.conf"
  +#ResourceConfig "$CWD/srm.conf"
  +#AccessConfig "$CWD/access.conf"
   
   Timeout 300
   
  @@ -16,7 +16,7 @@
   
   $LOADMODULES
   
  -Port 8081
  +Listen 8081
   
   ServerName localhost
   
  @@ -38,6 +38,8 @@
   HostnameLookups Off
   
   ErrorLog $CWD/error_log
  +TypesConfig $CWD/mime.types
  +LockFile $CWD/httpd.lock
   
   LogLevel debug
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org