Accept HTTP responses that have an empty reason-phrase, per RFC 2616

This commit is contained in:
James Coglan
2020-07-09 19:06:13 +01:00
parent f882bc56d5
commit e87bfef9bc
+1 -1
View File
@@ -4,7 +4,7 @@ module WebSocket
class Response
include Headers
STATUS_LINE = /^(HTTP\/[0-9]+\.[0-9]+) ([0-9]{3}) ([\x20-\x7e]+)$/
STATUS_LINE = /^(HTTP\/[0-9]+\.[0-9]+) ([0-9]{3}) ([\x20-\x7e]*)$/
attr_reader :code