diff options
author | sebres <sebres@users.sourceforge.net> | 2022-09-05 10:30:34 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2022-09-05 10:30:34 (GMT) |
commit | df50b9ade238e19ef27748a4a037b384d70bdf0a (patch) | |
tree | 0abb8343b7b178d0ebc79c2a23ea341cab578d0b /tests/httpd | |
parent | 337b5ab155b13596235bd36549efe9673cc6c7c9 (diff) | |
download | tcl-df50b9ade238e19ef27748a4a037b384d70bdf0a.zip tcl-df50b9ade238e19ef27748a4a037b384d70bdf0a.tar.gz tcl-df50b9ade238e19ef27748a4a037b384d70bdf0a.tar.bz2 |
closes [2641672fff], httpd - don't parse delay argument by error 400 (wrong URI/proto)
Diffstat (limited to 'tests/httpd')
-rw-r--r-- | tests/httpd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/httpd b/tests/httpd index 682556b..48e14ea 100644 --- a/tests/httpd +++ b/tests/httpd @@ -64,15 +64,15 @@ proc httpdRead { sock } { -> data(proto) data(url) data(query) data(httpversion)]} { set data(state) mime httpd_log $sock Query $line + if {[regexp {(?:^|[\?&])delay=([^&]+)} $data(query) {} val]} { + fileevent $sock readable {} + after $val [list fileevent $sock readable [list httpdRead $sock]] + } } else { httpdError $sock 400 httpd_log $sock Error "bad first line:$line" httpdSockDone $sock } - if {[regexp {(?:^|[\?&])delay=([^&]+)} $data(query) {} val]} { - fileevent $sock readable {} - after $val [list fileevent $sock readable [list httpdRead $sock]] - } return } elseif {$data(state) == "mime"} { |