diff options
Diffstat (limited to 'tests/httpd')
| -rw-r--r-- | tests/httpd | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/httpd b/tests/httpd index 93ee08a..232e80a 100644 --- a/tests/httpd +++ b/tests/httpd @@ -7,8 +7,6 @@ # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# SCCS: @(#) httpd 1.2 98/02/20 14:51:59 #set httpLog 1 @@ -42,7 +40,7 @@ proc httpdAccept {newsock ipaddr port} { fconfigure $newsock -blocking 0 -translation {auto crlf} httpd_log $newsock Connect $ipaddr $port set data(ipaddr) $ipaddr - fileevent $newsock readable [list httpdRead $newsock] + after 50 [list fileevent $newsock readable [list httpdRead $newsock]] } # read data from a client request @@ -177,6 +175,14 @@ proc httpdRespond { sock } { set html "Got [string length $data(query)] bytes" set type text/plain } + *headers* { + set html "" + set type text/plain + foreach {key value} $data(meta) { + append html [list $key $value] "\n" + } + set html [string trim $html] + } default { set type text/html |
