File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -227,9 +227,9 @@ def parse(socket=nil)
227
227
raise HTTPStatus ::BadRequest , "bad URI `#{ @unparsed_uri } '."
228
228
end
229
229
230
- if /close /io =~ self [ "connection" ]
230
+ if /\A close \z /io =~ self [ "connection" ]
231
231
@keep_alive = false
232
- elsif /keep -alive/io =~ self [ "connection" ]
232
+ elsif /\A keep -alive\z /io =~ self [ "connection" ]
233
233
@keep_alive = true
234
234
elsif @http_version < "1.1"
235
235
@keep_alive = false
@@ -508,7 +508,7 @@ def read_body(socket, block)
508
508
return unless socket
509
509
if tc = self [ 'transfer-encoding' ]
510
510
case tc
511
- when /chunked /io then read_chunked ( socket , block )
511
+ when /\A chunked \z /io then read_chunked ( socket , block )
512
512
else raise HTTPStatus ::NotImplemented , "Transfer-Encoding: #{ tc } ."
513
513
end
514
514
elsif self [ 'content-length' ] || @remaining_size
You can’t perform that action at this time.
0 commit comments