Skip to content

Commit

Permalink
Handle test_post(TestNetHTTP_v1_2): EOFError: end of file reached
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 10, 2024
1 parent 205bac7 commit 9aa17e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/net/http/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ def handle_get(path, headers, socket)
end

def handle_post(path, headers, socket)
body = socket.read(headers['Content-Length'].to_i)
begin
body = socket.read(headers['Content-Length'].to_i)
rescue EOFError
end
scheme = headers['X-Request-Scheme'] || 'http'
host = @config['host']
port = socket.addr[1]
Expand Down

0 comments on commit 9aa17e6

Please sign in to comment.