Opened 2 months ago

Last modified 2 months ago

#29125 new defect

Make websocket server tolerant of HTTP/2

Reported by: dcf Owned by:
Priority: Medium Milestone:
Component: Obfuscation/Snowflake Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The Snowflake websocket server, inherited from flash proxy, assumes that the incoming http.ResponseWriter implements the 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 gorilla/websocket fixes this and #28726.

Child Tickets

Change History (1)

comment:1 Changed 2 months ago by dcf

Component: - Select a componentObfuscation/Snowflake
Note: See TracTickets for help on using tickets.