Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/websocket/http/headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ def error?

def parse(chunk)
chunk.each_byte do |octet|
@size += 1
return error if @size > MAX_REQUEST_SIZE
if @stage < 2
@size += 1
return error if @size > MAX_REQUEST_SIZE
end

if octet == LF and @stage < 2
@buffer.pop if @buffer.last == CR
Expand Down