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 @@ -226,9 +226,9 @@ def parse(socket=nil)
226
226
raise HTTPStatus ::BadRequest , "bad URI `#{ @unparsed_uri } '."
227
227
end
228
228
229
- if /close /io =~ self [ "connection" ]
229
+ if /\A close \z /io =~ self [ "connection" ]
230
230
@keep_alive = false
231
- elsif /keep -alive/io =~ self [ "connection" ]
231
+ elsif /\A keep -alive\z /io =~ self [ "connection" ]
232
232
@keep_alive = true
233
233
elsif @http_version < "1.1"
234
234
@keep_alive = false
@@ -503,7 +503,7 @@ def read_body(socket, block)
503
503
return unless socket
504
504
if tc = self [ 'transfer-encoding' ]
505
505
case tc
506
- when /chunked /io then read_chunked ( socket , block )
506
+ when /\A chunked \z /io then read_chunked ( socket , block )
507
507
else raise HTTPStatus ::NotImplemented , "Transfer-Encoding: #{ tc } ."
508
508
end
509
509
elsif self [ 'content-length' ] || @remaining_size
You can’t perform that action at this time.
0 commit comments