File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def call(env)
2020
2121 read_headers = defined? ( Rack ::Headers ) ? Rack ::Headers . new ( headers ) : HeaderHash . new ( headers )
2222
23- headers [ 'X-Rack-Dev-Mark-Env ' ] = CGI . escape Rack ::DevMark . env
23+ headers [ 'x-rack-dev-mark-env ' ] = CGI . escape Rack ::DevMark . env
2424
2525 redirect = 300 <= status . to_i && status . to_i < 400
2626 if !redirect && !Rack ::DevMark . tmp_disabled && read_headers [ 'Content-Type' ] . to_s =~ %r{\b text/html\b }i
@@ -33,7 +33,7 @@ def call(env)
3333 end
3434 end
3535 response . close if response . respond_to? ( :close )
36- headers [ 'Content-Length ' ] = new_body . bytesize . to_s if read_headers [ 'Content-Length' ]
36+ headers [ 'content-length ' ] = new_body . bytesize . to_s if read_headers [ 'Content-Length' ]
3737 response = [ new_body ]
3838 end
3939
Original file line number Diff line number Diff line change 2525 context "ASCII env string" do
2626 it "adds http headers" do
2727 _ , headers , _ = subject . call ( { } )
28- expect ( headers ) . to include ( 'X-Rack-Dev-Mark-Env ' => 'test' )
28+ expect ( headers ) . to include ( 'x-rack-dev-mark-env ' => 'test' )
2929 end
3030 end
3131 context "Non ASCII string" do
3232 let ( :env ) { 'テスト' }
3333 it "adds http headers" do
3434 _ , headers , _ = subject . call ( { } )
35- expect ( headers ) . to include ( 'X-Rack-Dev-Mark-Env ' => '%E3%83%86%E3%82%B9%E3%83%88' )
35+ expect ( headers ) . to include ( 'x-rack-dev-mark-env ' => '%E3%83%86%E3%82%B9%E3%83%88' )
3636 end
3737 end
3838 end
You can’t perform that action at this time.
0 commit comments