summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-11-03 11:36:36 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-11-03 11:36:36 (GMT)
commit9620510685aba2a1cd7181551718278db98778c1 (patch)
treefed642f23557b2cffa6fe223d8a6d642aabb2ddc
parent91a40ecd324ba0f7d526ca0870e63ee813a59775 (diff)
downloadtcl-9620510685aba2a1cd7181551718278db98778c1.zip
tcl-9620510685aba2a1cd7181551718278db98778c1.tar.gz
tcl-9620510685aba2a1cd7181551718278db98778c1.tar.bz2
Minor syntactic changes
-rw-r--r--tests/httpd13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/httpd b/tests/httpd
index f41c3c1..b46a3f0 100644
--- a/tests/httpd
+++ b/tests/httpd
@@ -1,3 +1,4 @@
+# -*- tcl -*-
#
# The httpd_ procedures implement a stub http server.
#
@@ -27,7 +28,7 @@ array set httpdErrors {
404 {Not Found}
503 {Service Unavailable}
504 {Service Temporarily Unavailable}
- }
+}
proc httpdError {sock code args} {
global httpdErrors
@@ -56,8 +57,8 @@ proc httpdRead { sock } {
# Read the protocol line and parse out the URL and query
set readCount [gets $sock line]
- if [regexp {(POST|GET|HEAD) ([^?]+)\??([^ ]*) HTTP/(1.[01])} \
- $line x data(proto) data(url) data(query) data(httpversion)] {
+ if {[regexp {(POST|GET|HEAD) ([^?]+)\??([^ ]*) HTTP/(1.[01])} $line \
+ -> data(proto) data(url) data(query) data(httpversion)]} {
set data(state) mime
httpd_log $sock Query $line
} else {
@@ -96,7 +97,7 @@ proc httpdRead { sock } {
}
0,mime,HEAD -
0,mime,GET -
- 0,query,POST {
+ 0,query,POST {
# Empty line at end of headers,
# or eof after query data
httpdRespond $sock
@@ -192,7 +193,7 @@ proc httpdRespond { sock } {
append html </body></html>
}
}
-
+
# Catch errors from premature client closes
catch {
@@ -215,5 +216,3 @@ proc httpdRespond { sock } {
httpd_log $sock Done ""
httpdSockDone $sock
}
-
-