diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-25 16:13:03 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-25 16:13:03 (GMT) |
commit | 34aa927a148445f61ce5e2cc2a3403fc2a681255 (patch) | |
tree | bb9c5c140c638429ffe9c1c8115bf9c589eab183 | |
parent | 7c4cabaaae8d1f5b351e2016d56308e2531cca9b (diff) | |
parent | e14cd07627b4ca6018dc89e9333418965ef0d56b (diff) | |
download | tcl-34aa927a148445f61ce5e2cc2a3403fc2a681255.zip tcl-34aa927a148445f61ce5e2cc2a3403fc2a681255.tar.gz tcl-34aa927a148445f61ce5e2cc2a3403fc2a681255.tar.bz2 |
Merge 8.6
-rw-r--r-- | library/http/http.tcl | 18 | ||||
-rw-r--r-- | tests/http11.test | 2 | ||||
-rw-r--r-- | tests/socket.test | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 6e2ac4e..f9ec8ca 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -2698,18 +2698,18 @@ proc http::Event {sock token} { if {$tmpHeader in {close keep-alive}} { # The common cases, continue. } elseif {[string first , $tmpHeader] == -1} { - # Not a comma-separated list, not "close", - # therefore "keep-alive". - set tmpHeader keep-alive + # Not a comma-separated list, not "close", + # therefore "keep-alive". + set tmpHeader keep-alive } else { - set tmpHeader keep-alive - set tmpCsl [split $tmpHeader ,] - # Optional whitespace either side of separator. - foreach el $tmpCsl { - if {[string trim $el] eq {close}} { + set tmpHeader keep-alive + set tmpCsl [split $tmpHeader ,] + # Optional whitespace either side of separator. + foreach el $tmpCsl { + if {[string trim $el] eq {close}} { set tmpHeader close break - } + } } } set state(connection) $tmpHeader diff --git a/tests/http11.test b/tests/http11.test index 6d93d36..762788e 100644 --- a/tests/http11.test +++ b/tests/http11.test @@ -10,7 +10,7 @@ package require tcltest 2 namespace import -force ::tcltest::* -package require http 2.8 +package require http 2.9 # start the server variable httpd_output diff --git a/tests/socket.test b/tests/socket.test index 55b4f2f..87169ae 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -904,7 +904,7 @@ test socket_$af-5.1 {byte order problems, socket numbers, htons} -body { return {htons problem, should be disallowed, are you running as SU?} } return {couldn't open socket: not owner} -} -constraints [list socket supported_$af unix notRoot] -result {couldn't open socket: not owner} +} -constraints [list socket supported_$af unix notRoot notOSX] -result {couldn't open socket: not owner} test socket_$af-5.2 {byte order problems, socket numbers, htons} -body { if {![catch {socket -server dodo 0x10000} msg]} { close $msg @@ -918,7 +918,7 @@ test socket_$af-5.3 {byte order problems, socket numbers, htons} -body { return {htons problem, should be disallowed, are you running as SU?} } return {couldn't open socket: not owner} -} -constraints [list socket supported_$af unix notRoot] -result {couldn't open socket: not owner} +} -constraints [list socket supported_$af unix notRoot notOSX] -result {couldn't open socket: not owner} test socket_$af-6.1 {accept callback error} -constraints [list socket supported_$af stdio] -setup { proc myHandler {msg options} { |