[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #29125 [- Select a component]: Make websocket server tolerant of HTTP/2
#29125: Make websocket server tolerant of HTTP/2
--------------------------------------+--------------------
Reporter: dcf | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone:
Component: - Select a component | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
--------------------------------------+--------------------
The Snowflake websocket server, inherited from flash proxy,
[https://gitweb.torproject.org/pluggable-
transports/websocket.git/tree/websocket/websocket.go?h=0.3#n326 assumes]
that the incoming http.ResponseWriter implements the
[https://golang.org/pkg/net/http/#Hijacker http.Hijacker] interface, which
HTTP/2 connections do not.
It causes a panic in the log when you connect to the server with e.g.
curl:
{{{
2019/01/18 18:56:29 http2: panic serving X.X.X.X:YYYY: interface
conversion: *http2.responseWriter is not http.Hijacker: missing method
Hijack
}}}
I'm not sure if WebSocket connections from browsers use HTTP/2 yet or not,
but in any case we should handle it gracefully.
My first inclination is to see if porting to
[https://godoc.org/github.com/gorilla/websocket gorilla/websocket] fixes
this and #28726.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29125>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs