http package reply "100 continue" code broken
What happens? https://tools.ietf.org/html/rfc7231#section-6.2.1
The first line of a web server reply contains the status. If this is:
HTTP/1.1 100 Continethe real header will follow as a following line.
The current code correctly ignores the continue status, but does not expect a following status line.
The insertion of a set to state "connecting" fixes that (around line 1034):
proc http::Event {sock token} {
...
# We ignore HTTP/1.1 100 Continue returns. RFC2616 sec 8.2.3
if {$state(http) == "" || ([regexp {^\S+\s(\d+)} $state(http) {} x] && $x == 100)} {
set state(state) "connecting"
return
}
At least, inserting this line cured the communication for me with TCLWS and a .net server.
d6bb682808http state 100 continue handling broken [2a94652ee1] check-in2017-08-31 09:46:4079053036d8http state 100 continue handling broken [2a94652ee1] check-in2017-08-31 09:35:52fb94c24691http state 100 continue handling broken [2a94652ee1] check-in2017-08-31 09:32:05b80bf5033fhttp state 100 continue handling broken [2a94652ee1] check-in2017-08-31 06:31:05
Branch [bug-2a94652ee1] with commit [b80bf5033f] inserts the proposed line and increses the version number of the http number.
I would appreciate a review before merge or just a merge.
The fix is IMHO ok and works well for me. The review is mor for formal issues like version number increment and targeting branches.
Well, I cannot find anything wrong with it. So, just go ahead (with merging to core-8-6-branch -> trunk -> novem)! Thanks!
Ok, committed to all branches.
Thank you !