[Webkit-unassigned] [Bug 202095] websockets handshaking broken for responses that omit status text / reason
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 24 10:45:52 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=202095
--- Comment #3 from Joey Korkames <joey at kidfixit.com> ---
autobahn.py's WS testsuite* seems to agree with Chrome & FF handshake impls, but not webkit's:
# Response Line
#
sl = self.http_status_line.split()
if len(sl) < 2:
return self.failHandshake("Bad HTTP response status line '%s'" % self.http_status_line)
In [1]: len("HTTP/1.1 101".split())
Out[1]: 2
1: https://github.com/crossbario/autobahn-python/blob/f0d15f02735429e3f92ea56502b79b33acc65882/autobahn/websocket/protocol.py#L3674)
Its tyranny of the majority (of UAs), including Safari, if its using NSURLSession & I'm following it accurately:
https://opensource.apple.com/source/CFNetwork/CFNetwork-129.20/HTTP/CFHTTPStream.c.auto.html
httpReceiveResponse is just checking it got all the bytes it can get
nextActionForHeaders() calls CFHTTPMessageGetResponseStatusCode(CFMessageRef headers)...
https://opensource.apple.com/source/CFNetwork/CFNetwork-129.20/HTTP/CFHTTPMessage.c.auto.html
looks for the .flags[status] that *_extractResponseStatusLine got when initializing the CFHTTPMessage (after _parseHeadersFromData was fired on the last append of message's bytes)
*_extractResponseStatusLine(...) seems to parse for just the code numbers
Very hard to follow!
But this is borne out when trying to browse this server in Safari.
it's inspector says:
"Failed to load resource: the server responded with a status of 400 () -- https://web.voice.telephony.goog/favicon.ico"
showing CFNetwork does tolerate the truncated status line.
I suppose there's already a task open to convert webcore:websockets to NSURLSession or CFURLConnection?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190924/22027ee2/attachment.html>
More information about the webkit-unassigned
mailing list