rack 1.6.13 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rack might be problematic. Click here for more details.

Files changed (144) hide show
  1. checksums.yaml +5 -5
  2. data/COPYING +1 -1
  3. data/HISTORY.md +138 -8
  4. data/README.rdoc +17 -25
  5. data/Rakefile +6 -14
  6. data/SPEC +8 -9
  7. data/contrib/rack_logo.svg +164 -111
  8. data/example/protectedlobster.rb +1 -1
  9. data/example/protectedlobster.ru +1 -1
  10. data/lib/rack/auth/abstract/request.rb +5 -1
  11. data/lib/rack/auth/digest/params.rb +2 -3
  12. data/lib/rack/auth/digest/request.rb +1 -1
  13. data/lib/rack/body_proxy.rb +14 -9
  14. data/lib/rack/builder.rb +3 -3
  15. data/lib/rack/chunked.rb +5 -5
  16. data/lib/rack/{commonlogger.rb → common_logger.rb} +3 -3
  17. data/lib/rack/{conditionalget.rb → conditional_get.rb} +0 -0
  18. data/lib/rack/content_length.rb +2 -2
  19. data/lib/rack/deflater.rb +4 -4
  20. data/lib/rack/directory.rb +66 -54
  21. data/lib/rack/etag.rb +4 -3
  22. data/lib/rack/events.rb +154 -0
  23. data/lib/rack/file.rb +63 -39
  24. data/lib/rack/handler/cgi.rb +15 -16
  25. data/lib/rack/handler/fastcgi.rb +13 -14
  26. data/lib/rack/handler/lsws.rb +11 -11
  27. data/lib/rack/handler/scgi.rb +15 -15
  28. data/lib/rack/handler/thin.rb +3 -0
  29. data/lib/rack/handler/webrick.rb +22 -24
  30. data/lib/rack/handler.rb +3 -25
  31. data/lib/rack/head.rb +15 -17
  32. data/lib/rack/lint.rb +38 -38
  33. data/lib/rack/lobster.rb +1 -1
  34. data/lib/rack/lock.rb +6 -10
  35. data/lib/rack/logger.rb +2 -2
  36. data/lib/rack/media_type.rb +38 -0
  37. data/lib/rack/{methodoverride.rb → method_override.rb} +4 -11
  38. data/lib/rack/mime.rb +18 -5
  39. data/lib/rack/mock.rb +35 -53
  40. data/lib/rack/multipart/generator.rb +5 -5
  41. data/lib/rack/multipart/parser.rb +272 -158
  42. data/lib/rack/multipart/uploaded_file.rb +1 -2
  43. data/lib/rack/multipart.rb +35 -6
  44. data/lib/rack/{nulllogger.rb → null_logger.rb} +1 -1
  45. data/lib/rack/query_parser.rb +192 -0
  46. data/lib/rack/recursive.rb +8 -8
  47. data/lib/rack/request.rb +383 -307
  48. data/lib/rack/response.rb +129 -56
  49. data/lib/rack/rewindable_input.rb +1 -12
  50. data/lib/rack/runtime.rb +10 -18
  51. data/lib/rack/sendfile.rb +5 -7
  52. data/lib/rack/server.rb +31 -25
  53. data/lib/rack/session/abstract/id.rb +95 -135
  54. data/lib/rack/session/cookie.rb +26 -28
  55. data/lib/rack/session/memcache.rb +8 -14
  56. data/lib/rack/session/pool.rb +14 -21
  57. data/lib/rack/show_exceptions.rb +386 -0
  58. data/lib/rack/{showstatus.rb → show_status.rb} +3 -3
  59. data/lib/rack/static.rb +30 -5
  60. data/lib/rack/tempfile_reaper.rb +2 -2
  61. data/lib/rack/urlmap.rb +15 -14
  62. data/lib/rack/utils.rb +135 -210
  63. data/lib/rack.rb +70 -21
  64. data/rack.gemspec +7 -5
  65. data/test/builder/an_underscore_app.rb +5 -0
  66. data/test/builder/options.ru +1 -1
  67. data/test/cgi/test.fcgi +1 -0
  68. data/test/cgi/test.gz +0 -0
  69. data/test/helper.rb +34 -0
  70. data/test/multipart/filename_with_encoded_words +7 -0
  71. data/test/multipart/{filename_with_null_byte → filename_with_single_quote} +1 -1
  72. data/test/multipart/quoted +15 -0
  73. data/test/multipart/rack-logo.png +0 -0
  74. data/test/multipart/unity3d_wwwform +11 -0
  75. data/test/registering_handler/rack/handler/registering_myself.rb +1 -1
  76. data/test/spec_auth_basic.rb +27 -19
  77. data/test/spec_auth_digest.rb +47 -46
  78. data/test/spec_body_proxy.rb +27 -27
  79. data/test/spec_builder.rb +51 -41
  80. data/test/spec_cascade.rb +24 -22
  81. data/test/spec_cgi.rb +49 -67
  82. data/test/spec_chunked.rb +36 -34
  83. data/test/{spec_commonlogger.rb → spec_common_logger.rb} +23 -21
  84. data/test/{spec_conditionalget.rb → spec_conditional_get.rb} +29 -28
  85. data/test/spec_config.rb +3 -2
  86. data/test/spec_content_length.rb +18 -17
  87. data/test/spec_content_type.rb +13 -12
  88. data/test/spec_deflater.rb +66 -40
  89. data/test/spec_directory.rb +87 -27
  90. data/test/spec_etag.rb +32 -31
  91. data/test/spec_events.rb +133 -0
  92. data/test/spec_fastcgi.rb +50 -72
  93. data/test/spec_file.rb +107 -77
  94. data/test/spec_handler.rb +19 -34
  95. data/test/spec_head.rb +15 -14
  96. data/test/spec_lint.rb +162 -197
  97. data/test/spec_lobster.rb +24 -23
  98. data/test/spec_lock.rb +69 -39
  99. data/test/spec_logger.rb +4 -3
  100. data/test/spec_media_type.rb +42 -0
  101. data/test/spec_method_override.rb +83 -0
  102. data/test/spec_mime.rb +19 -19
  103. data/test/spec_mock.rb +196 -151
  104. data/test/spec_multipart.rb +317 -201
  105. data/test/{spec_nulllogger.rb → spec_null_logger.rb} +5 -4
  106. data/test/spec_recursive.rb +17 -14
  107. data/test/spec_request.rb +768 -607
  108. data/test/spec_response.rb +214 -111
  109. data/test/spec_rewindable_input.rb +50 -40
  110. data/test/spec_runtime.rb +11 -10
  111. data/test/spec_sendfile.rb +30 -35
  112. data/test/spec_server.rb +78 -52
  113. data/test/spec_session_abstract_id.rb +11 -33
  114. data/test/spec_session_abstract_session_hash.rb +28 -0
  115. data/test/spec_session_cookie.rb +97 -65
  116. data/test/spec_session_memcache.rb +63 -101
  117. data/test/spec_session_pool.rb +48 -84
  118. data/test/spec_show_exceptions.rb +80 -0
  119. data/test/{spec_showstatus.rb → spec_show_status.rb} +36 -35
  120. data/test/spec_static.rb +71 -32
  121. data/test/spec_tempfile_reaper.rb +11 -10
  122. data/test/spec_thin.rb +55 -50
  123. data/test/spec_urlmap.rb +79 -78
  124. data/test/spec_utils.rb +441 -346
  125. data/test/spec_version.rb +2 -8
  126. data/test/spec_webrick.rb +91 -67
  127. data/test/static/foo.html +1 -0
  128. data/test/testrequest.rb +1 -1
  129. data/test/unregistered_handler/rack/handler/unregistered.rb +1 -1
  130. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +1 -1
  131. metadata +103 -69
  132. data/KNOWN-ISSUES +0 -44
  133. data/lib/rack/backports/uri/common_18.rb +0 -56
  134. data/lib/rack/backports/uri/common_192.rb +0 -52
  135. data/lib/rack/backports/uri/common_193.rb +0 -29
  136. data/lib/rack/handler/evented_mongrel.rb +0 -8
  137. data/lib/rack/handler/mongrel.rb +0 -106
  138. data/lib/rack/handler/swiftiplied_mongrel.rb +0 -8
  139. data/lib/rack/showexceptions.rb +0 -387
  140. data/lib/rack/utils/okjson.rb +0 -600
  141. data/test/spec_methodoverride.rb +0 -111
  142. data/test/spec_mongrel.rb +0 -182
  143. data/test/spec_session_persisted_secure_secure_session_hash.rb +0 -73
  144. data/test/spec_showexceptions.rb +0 -98
data/test/spec_version.rb CHANGED
@@ -1,17 +1,11 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ require 'minitest/autorun'
2
3
  require 'rack'
3
4
 
4
5
  describe Rack do
5
6
  describe 'version' do
6
7
  it 'defaults to a hard-coded api version' do
7
- Rack.version.should.equal("1.3")
8
- end
9
- end
10
- describe 'release' do
11
- it 'matches version in .gemspec' do
12
- gemspec_path = File.join(File.dirname(File.expand_path(__FILE__)), '../rack.gemspec')
13
- gemspec = Gem::Specification.load(gemspec_path)
14
- Rack.release.split('.').take(2).should.equal gemspec.version.to_s.split('.').take(2)
8
+ Rack.version.must_equal "1.3"
15
9
  end
16
10
  end
17
11
  end
data/test/spec_webrick.rb CHANGED
@@ -1,92 +1,108 @@
1
+ require 'minitest/autorun'
1
2
  require 'rack/mock'
3
+ require 'concurrent/atomic/count_down_latch'
2
4
  require File.expand_path('../testrequest', __FILE__)
3
5
 
4
6
  Thread.abort_on_exception = true
5
7
 
6
8
  describe Rack::Handler::WEBrick do
7
- extend TestRequest::Helpers
9
+ include TestRequest::Helpers
8
10
 
11
+ before do
9
12
  @server = WEBrick::HTTPServer.new(:Host => @host='127.0.0.1',
10
13
  :Port => @port=9202,
11
14
  :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN),
12
15
  :AccessLog => [])
13
16
  @server.mount "/test", Rack::Handler::WEBrick,
14
17
  Rack::Lint.new(TestRequest.new)
15
- Thread.new { @server.start }
18
+ @thread = Thread.new { @server.start }
16
19
  trap(:INT) { @server.shutdown }
20
+ @status_thread = Thread.new do
21
+ seconds = 10
22
+ wait_time = 0.1
23
+ until is_running? || seconds <= 0
24
+ seconds -= wait_time
25
+ sleep wait_time
26
+ end
27
+ raise "Server never reached status 'Running'" unless is_running?
28
+ end
29
+ end
17
30
 
18
- should "respond" do
19
- lambda {
20
- GET("/test")
21
- }.should.not.raise
31
+ def is_running?
32
+ @server.status == :Running
33
+ end
34
+
35
+ it "respond" do
36
+ GET("/test")
37
+ status.must_equal 200
22
38
  end
23
39
 
24
- should "be a WEBrick" do
40
+ it "be a WEBrick" do
25
41
  GET("/test")
26
- status.should.equal 200
27
- response["SERVER_SOFTWARE"].should =~ /WEBrick/
28
- response["HTTP_VERSION"].should.equal "HTTP/1.1"
29
- response["SERVER_PROTOCOL"].should.equal "HTTP/1.1"
30
- response["SERVER_PORT"].should.equal "9202"
31
- response["SERVER_NAME"].should.equal "127.0.0.1"
42
+ status.must_equal 200
43
+ response["SERVER_SOFTWARE"].must_match(/WEBrick/)
44
+ response["HTTP_VERSION"].must_equal "HTTP/1.1"
45
+ response["SERVER_PROTOCOL"].must_equal "HTTP/1.1"
46
+ response["SERVER_PORT"].must_equal "9202"
47
+ response["SERVER_NAME"].must_equal "127.0.0.1"
32
48
  end
33
49
 
34
- should "have rack headers" do
50
+ it "have rack headers" do
35
51
  GET("/test")
36
- response["rack.version"].should.equal [1,3]
37
- response["rack.multithread"].should.be.true
38
- response["rack.multiprocess"].should.be.false
39
- response["rack.run_once"].should.be.false
52
+ response["rack.version"].must_equal [1,3]
53
+ response["rack.multithread"].must_equal true
54
+ assert_equal false, response["rack.multiprocess"]
55
+ assert_equal false, response["rack.run_once"]
40
56
  end
41
57
 
42
- should "have CGI headers on GET" do
58
+ it "have CGI headers on GET" do
43
59
  GET("/test")
44
- response["REQUEST_METHOD"].should.equal "GET"
45
- response["SCRIPT_NAME"].should.equal "/test"
46
- response["REQUEST_PATH"].should.equal "/test"
47
- response["PATH_INFO"].should.be.equal ""
48
- response["QUERY_STRING"].should.equal ""
49
- response["test.postdata"].should.equal ""
60
+ response["REQUEST_METHOD"].must_equal "GET"
61
+ response["SCRIPT_NAME"].must_equal "/test"
62
+ response["REQUEST_PATH"].must_equal "/test"
63
+ response["PATH_INFO"].must_equal ""
64
+ response["QUERY_STRING"].must_equal ""
65
+ response["test.postdata"].must_equal ""
50
66
 
51
67
  GET("/test/foo?quux=1")
52
- response["REQUEST_METHOD"].should.equal "GET"
53
- response["SCRIPT_NAME"].should.equal "/test"
54
- response["REQUEST_PATH"].should.equal "/test/foo"
55
- response["PATH_INFO"].should.equal "/foo"
56
- response["QUERY_STRING"].should.equal "quux=1"
68
+ response["REQUEST_METHOD"].must_equal "GET"
69
+ response["SCRIPT_NAME"].must_equal "/test"
70
+ response["REQUEST_PATH"].must_equal "/test/foo"
71
+ response["PATH_INFO"].must_equal "/foo"
72
+ response["QUERY_STRING"].must_equal "quux=1"
57
73
 
58
74
  GET("/test/foo%25encoding?quux=1")
59
- response["REQUEST_METHOD"].should.equal "GET"
60
- response["SCRIPT_NAME"].should.equal "/test"
61
- response["REQUEST_PATH"].should.equal "/test/foo%25encoding"
62
- response["PATH_INFO"].should.equal "/foo%25encoding"
63
- response["QUERY_STRING"].should.equal "quux=1"
75
+ response["REQUEST_METHOD"].must_equal "GET"
76
+ response["SCRIPT_NAME"].must_equal "/test"
77
+ response["REQUEST_PATH"].must_equal "/test/foo%25encoding"
78
+ response["PATH_INFO"].must_equal "/foo%25encoding"
79
+ response["QUERY_STRING"].must_equal "quux=1"
64
80
  end
65
81
 
66
- should "have CGI headers on POST" do
82
+ it "have CGI headers on POST" do
67
83
  POST("/test", {"rack-form-data" => "23"}, {'X-test-header' => '42'})
68
- status.should.equal 200
69
- response["REQUEST_METHOD"].should.equal "POST"
70
- response["SCRIPT_NAME"].should.equal "/test"
71
- response["REQUEST_PATH"].should.equal "/test"
72
- response["PATH_INFO"].should.equal ""
73
- response["QUERY_STRING"].should.equal ""
74
- response["HTTP_X_TEST_HEADER"].should.equal "42"
75
- response["test.postdata"].should.equal "rack-form-data=23"
84
+ status.must_equal 200
85
+ response["REQUEST_METHOD"].must_equal "POST"
86
+ response["SCRIPT_NAME"].must_equal "/test"
87
+ response["REQUEST_PATH"].must_equal "/test"
88
+ response["PATH_INFO"].must_equal ""
89
+ response["QUERY_STRING"].must_equal ""
90
+ response["HTTP_X_TEST_HEADER"].must_equal "42"
91
+ response["test.postdata"].must_equal "rack-form-data=23"
76
92
  end
77
93
 
78
- should "support HTTP auth" do
94
+ it "support HTTP auth" do
79
95
  GET("/test", {:user => "ruth", :passwd => "secret"})
80
- response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ="
96
+ response["HTTP_AUTHORIZATION"].must_equal "Basic cnV0aDpzZWNyZXQ="
81
97
  end
82
98
 
83
- should "set status" do
99
+ it "set status" do
84
100
  GET("/test?secret")
85
- status.should.equal 403
86
- response["rack.url_scheme"].should.equal "http"
101
+ status.must_equal 403
102
+ response["rack.url_scheme"].must_equal "http"
87
103
  end
88
104
 
89
- should "correctly set cookies" do
105
+ it "correctly set cookies" do
90
106
  @server.mount "/cookie-test", Rack::Handler::WEBrick,
91
107
  Rack::Lint.new(lambda { |req|
92
108
  res = Rack::Response.new
@@ -97,14 +113,16 @@ describe Rack::Handler::WEBrick do
97
113
 
98
114
  Net::HTTP.start(@host, @port) { |http|
99
115
  res = http.get("/cookie-test")
100
- res.code.to_i.should.equal 200
101
- res.get_fields("set-cookie").should.equal ["one=1", "two=2"]
116
+ res.code.to_i.must_equal 200
117
+ res.get_fields("set-cookie").must_equal ["one=1", "two=2"]
102
118
  }
103
119
  end
104
120
 
105
- should "provide a .run" do
121
+ it "provide a .run" do
106
122
  block_ran = false
107
- catch(:done) {
123
+ latch = Concurrent::CountDownLatch.new 1
124
+
125
+ t = Thread.new do
108
126
  Rack::Handler::WEBrick.run(lambda {},
109
127
  {
110
128
  :Host => '127.0.0.1',
@@ -112,16 +130,18 @@ describe Rack::Handler::WEBrick do
112
130
  :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN),
113
131
  :AccessLog => []}) { |server|
114
132
  block_ran = true
115
- server.should.be.kind_of WEBrick::HTTPServer
133
+ assert_kind_of WEBrick::HTTPServer, server
116
134
  @s = server
117
- throw :done
135
+ latch.count_down
118
136
  }
119
- }
120
- block_ran.should.be.true
137
+ end
138
+
139
+ latch.wait
121
140
  @s.shutdown
141
+ t.join
122
142
  end
123
143
 
124
- should "return repeated headers" do
144
+ it "return repeated headers" do
125
145
  @server.mount "/headers", Rack::Handler::WEBrick,
126
146
  Rack::Lint.new(lambda { |req|
127
147
  [
@@ -134,12 +154,12 @@ describe Rack::Handler::WEBrick do
134
154
 
135
155
  Net::HTTP.start(@host, @port) { |http|
136
156
  res = http.get("/headers")
137
- res.code.to_i.should.equal 401
138
- res["www-authenticate"].should.equal "Bar realm=X, Baz realm=Y"
157
+ res.code.to_i.must_equal 401
158
+ res["www-authenticate"].must_equal "Bar realm=X, Baz realm=Y"
139
159
  }
140
160
  end
141
161
 
142
- should "support Rack partial hijack" do
162
+ it "support Rack partial hijack" do
143
163
  io_lambda = lambda{ |io|
144
164
  5.times do
145
165
  io.write "David\r\n"
@@ -158,11 +178,11 @@ describe Rack::Handler::WEBrick do
158
178
 
159
179
  Net::HTTP.start(@host, @port){ |http|
160
180
  res = http.get("/partial")
161
- res.body.should.equal "David\r\nDavid\r\nDavid\r\nDavid\r\nDavid\r\n"
181
+ res.body.must_equal "David\r\nDavid\r\nDavid\r\nDavid\r\nDavid\r\n"
162
182
  }
163
183
  end
164
184
 
165
- should "produce correct HTTP semantics with and without app chunking" do
185
+ it "produce correct HTTP semantics with and without app chunking" do
166
186
  @server.mount "/chunked", Rack::Handler::WEBrick,
167
187
  Rack::Lint.new(lambda{ |req|
168
188
  [
@@ -174,11 +194,15 @@ describe Rack::Handler::WEBrick do
174
194
 
175
195
  Net::HTTP.start(@host, @port){ |http|
176
196
  res = http.get("/chunked")
177
- res["Transfer-Encoding"].should.equal "chunked"
178
- res["Content-Length"].should.equal nil
179
- res.body.should.equal "chunked"
197
+ res["Transfer-Encoding"].must_equal "chunked"
198
+ res["Content-Length"].must_equal nil
199
+ res.body.must_equal "chunked"
180
200
  }
181
201
  end
182
202
 
203
+ after do
204
+ @status_thread.join
183
205
  @server.shutdown
206
+ @thread.join
207
+ end
184
208
  end
@@ -0,0 +1 @@
1
+ foo.html!
data/test/testrequest.rb CHANGED
@@ -12,7 +12,7 @@ class TestRequest
12
12
  # This may in the future want to replace with a dummy value instead.
13
13
  minienv.delete_if { |k,v| NOSERIALIZE.any? { |c| v.kind_of?(c) } }
14
14
  body = minienv.to_yaml
15
- size = body.respond_to?(:bytesize) ? body.bytesize : body.size
15
+ size = body.bytesize
16
16
  [status, {"Content-Type" => "text/yaml", "Content-Length" => size.to_s}, [body]]
17
17
  end
18
18
 
@@ -4,4 +4,4 @@ module Rack
4
4
  class Unregistered
5
5
  end
6
6
  end
7
- end
7
+ end
@@ -4,4 +4,4 @@ module Rack
4
4
  class UnregisteredLongOne
5
5
  end
6
6
  end
7
- end
7
+ end
metadata CHANGED
@@ -1,17 +1,45 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.13
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-08 00:00:00.000000000 Z
11
+ date: 2016-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bacon
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-sprint
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: concurrent-ruby
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
45
  - - ">="
@@ -52,12 +80,10 @@ executables:
52
80
  extensions: []
53
81
  extra_rdoc_files:
54
82
  - README.rdoc
55
- - KNOWN-ISSUES
56
83
  - HISTORY.md
57
84
  files:
58
85
  - COPYING
59
86
  - HISTORY.md
60
- - KNOWN-ISSUES
61
87
  - README.rdoc
62
88
  - Rakefile
63
89
  - SPEC
@@ -77,30 +103,25 @@ files:
77
103
  - lib/rack/auth/digest/nonce.rb
78
104
  - lib/rack/auth/digest/params.rb
79
105
  - lib/rack/auth/digest/request.rb
80
- - lib/rack/backports/uri/common_18.rb
81
- - lib/rack/backports/uri/common_192.rb
82
- - lib/rack/backports/uri/common_193.rb
83
106
  - lib/rack/body_proxy.rb
84
107
  - lib/rack/builder.rb
85
108
  - lib/rack/cascade.rb
86
109
  - lib/rack/chunked.rb
87
- - lib/rack/commonlogger.rb
88
- - lib/rack/conditionalget.rb
110
+ - lib/rack/common_logger.rb
111
+ - lib/rack/conditional_get.rb
89
112
  - lib/rack/config.rb
90
113
  - lib/rack/content_length.rb
91
114
  - lib/rack/content_type.rb
92
115
  - lib/rack/deflater.rb
93
116
  - lib/rack/directory.rb
94
117
  - lib/rack/etag.rb
118
+ - lib/rack/events.rb
95
119
  - lib/rack/file.rb
96
120
  - lib/rack/handler.rb
97
121
  - lib/rack/handler/cgi.rb
98
- - lib/rack/handler/evented_mongrel.rb
99
122
  - lib/rack/handler/fastcgi.rb
100
123
  - lib/rack/handler/lsws.rb
101
- - lib/rack/handler/mongrel.rb
102
124
  - lib/rack/handler/scgi.rb
103
- - lib/rack/handler/swiftiplied_mongrel.rb
104
125
  - lib/rack/handler/thin.rb
105
126
  - lib/rack/handler/webrick.rb
106
127
  - lib/rack/head.rb
@@ -108,14 +129,16 @@ files:
108
129
  - lib/rack/lobster.rb
109
130
  - lib/rack/lock.rb
110
131
  - lib/rack/logger.rb
111
- - lib/rack/methodoverride.rb
132
+ - lib/rack/media_type.rb
133
+ - lib/rack/method_override.rb
112
134
  - lib/rack/mime.rb
113
135
  - lib/rack/mock.rb
114
136
  - lib/rack/multipart.rb
115
137
  - lib/rack/multipart/generator.rb
116
138
  - lib/rack/multipart/parser.rb
117
139
  - lib/rack/multipart/uploaded_file.rb
118
- - lib/rack/nulllogger.rb
140
+ - lib/rack/null_logger.rb
141
+ - lib/rack/query_parser.rb
119
142
  - lib/rack/recursive.rb
120
143
  - lib/rack/reloader.rb
121
144
  - lib/rack/request.rb
@@ -128,14 +151,14 @@ files:
128
151
  - lib/rack/session/cookie.rb
129
152
  - lib/rack/session/memcache.rb
130
153
  - lib/rack/session/pool.rb
131
- - lib/rack/showexceptions.rb
132
- - lib/rack/showstatus.rb
154
+ - lib/rack/show_exceptions.rb
155
+ - lib/rack/show_status.rb
133
156
  - lib/rack/static.rb
134
157
  - lib/rack/tempfile_reaper.rb
135
158
  - lib/rack/urlmap.rb
136
159
  - lib/rack/utils.rb
137
- - lib/rack/utils/okjson.rb
138
160
  - rack.gemspec
161
+ - test/builder/an_underscore_app.rb
139
162
  - test/builder/anything.rb
140
163
  - test/builder/comment.ru
141
164
  - test/builder/end.ru
@@ -153,8 +176,10 @@ files:
153
176
  - test/cgi/test
154
177
  - test/cgi/test+directory/test+file
155
178
  - test/cgi/test.fcgi
179
+ - test/cgi/test.gz
156
180
  - test/cgi/test.ru
157
181
  - test/gemloader.rb
182
+ - test/helper.rb
158
183
  - test/multipart/bad_robots
159
184
  - test/multipart/binary
160
185
  - test/multipart/content_type_and_no_filename
@@ -163,10 +188,11 @@ files:
163
188
  - test/multipart/file1.txt
164
189
  - test/multipart/filename_and_modification_param
165
190
  - test/multipart/filename_and_no_name
191
+ - test/multipart/filename_with_encoded_words
166
192
  - test/multipart/filename_with_escaped_quotes
167
193
  - test/multipart/filename_with_escaped_quotes_and_modification_param
168
- - test/multipart/filename_with_null_byte
169
194
  - test/multipart/filename_with_percent_escaped_quotes
195
+ - test/multipart/filename_with_single_quote
170
196
  - test/multipart/filename_with_unescaped_percentages
171
197
  - test/multipart/filename_with_unescaped_percentages2
172
198
  - test/multipart/filename_with_unescaped_percentages3
@@ -176,9 +202,12 @@ files:
176
202
  - test/multipart/mixed_files
177
203
  - test/multipart/nested
178
204
  - test/multipart/none
205
+ - test/multipart/quoted
206
+ - test/multipart/rack-logo.png
179
207
  - test/multipart/semicolon
180
208
  - test/multipart/text
181
209
  - test/multipart/three_files_three_fields
210
+ - test/multipart/unity3d_wwwform
182
211
  - test/multipart/webkit
183
212
  - test/rackup/config.ru
184
213
  - test/registering_handler/rack/handler/registering_myself.rb
@@ -189,14 +218,15 @@ files:
189
218
  - test/spec_cascade.rb
190
219
  - test/spec_cgi.rb
191
220
  - test/spec_chunked.rb
192
- - test/spec_commonlogger.rb
193
- - test/spec_conditionalget.rb
221
+ - test/spec_common_logger.rb
222
+ - test/spec_conditional_get.rb
194
223
  - test/spec_config.rb
195
224
  - test/spec_content_length.rb
196
225
  - test/spec_content_type.rb
197
226
  - test/spec_deflater.rb
198
227
  - test/spec_directory.rb
199
228
  - test/spec_etag.rb
229
+ - test/spec_events.rb
200
230
  - test/spec_fastcgi.rb
201
231
  - test/spec_file.rb
202
232
  - test/spec_handler.rb
@@ -205,12 +235,12 @@ files:
205
235
  - test/spec_lobster.rb
206
236
  - test/spec_lock.rb
207
237
  - test/spec_logger.rb
208
- - test/spec_methodoverride.rb
238
+ - test/spec_media_type.rb
239
+ - test/spec_method_override.rb
209
240
  - test/spec_mime.rb
210
241
  - test/spec_mock.rb
211
- - test/spec_mongrel.rb
212
242
  - test/spec_multipart.rb
213
- - test/spec_nulllogger.rb
243
+ - test/spec_null_logger.rb
214
244
  - test/spec_recursive.rb
215
245
  - test/spec_request.rb
216
246
  - test/spec_response.rb
@@ -219,12 +249,12 @@ files:
219
249
  - test/spec_sendfile.rb
220
250
  - test/spec_server.rb
221
251
  - test/spec_session_abstract_id.rb
252
+ - test/spec_session_abstract_session_hash.rb
222
253
  - test/spec_session_cookie.rb
223
254
  - test/spec_session_memcache.rb
224
- - test/spec_session_persisted_secure_secure_session_hash.rb
225
255
  - test/spec_session_pool.rb
226
- - test/spec_showexceptions.rb
227
- - test/spec_showstatus.rb
256
+ - test/spec_show_exceptions.rb
257
+ - test/spec_show_status.rb
228
258
  - test/spec_static.rb
229
259
  - test/spec_tempfile_reaper.rb
230
260
  - test/spec_thin.rb
@@ -233,6 +263,7 @@ files:
233
263
  - test/spec_version.rb
234
264
  - test/spec_webrick.rb
235
265
  - test/static/another/index.html
266
+ - test/static/foo.html
236
267
  - test/static/index.html
237
268
  - test/testrequest.rb
238
269
  - test/unregistered_handler/rack/handler/unregistered.rb
@@ -249,65 +280,68 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
280
  requirements:
250
281
  - - ">="
251
282
  - !ruby/object:Gem::Version
252
- version: '0'
283
+ version: 2.2.2
253
284
  required_rubygems_version: !ruby/object:Gem::Requirement
254
285
  requirements:
255
286
  - - ">="
256
287
  - !ruby/object:Gem::Version
257
288
  version: '0'
258
289
  requirements: []
259
- rubygems_version: 3.1.2
290
+ rubyforge_project:
291
+ rubygems_version: 2.6.6
260
292
  signing_key:
261
293
  specification_version: 4
262
294
  summary: a modular Ruby webserver interface
263
295
  test_files:
264
- - test/spec_multipart.rb
296
+ - test/spec_auth_basic.rb
297
+ - test/spec_auth_digest.rb
298
+ - test/spec_body_proxy.rb
299
+ - test/spec_builder.rb
300
+ - test/spec_cascade.rb
301
+ - test/spec_cgi.rb
302
+ - test/spec_chunked.rb
303
+ - test/spec_common_logger.rb
304
+ - test/spec_conditional_get.rb
305
+ - test/spec_config.rb
306
+ - test/spec_content_length.rb
307
+ - test/spec_content_type.rb
265
308
  - test/spec_deflater.rb
266
- - test/spec_static.rb
267
- - test/spec_session_cookie.rb
268
- - test/spec_commonlogger.rb
269
- - test/spec_session_pool.rb
270
- - test/spec_methodoverride.rb
309
+ - test/spec_directory.rb
271
310
  - test/spec_etag.rb
272
- - test/spec_version.rb
311
+ - test/spec_events.rb
312
+ - test/spec_fastcgi.rb
313
+ - test/spec_file.rb
273
314
  - test/spec_handler.rb
274
- - test/spec_thin.rb
275
- - test/spec_showexceptions.rb
276
- - test/spec_session_abstract_id.rb
315
+ - test/spec_head.rb
316
+ - test/spec_lint.rb
317
+ - test/spec_lobster.rb
318
+ - test/spec_lock.rb
319
+ - test/spec_logger.rb
320
+ - test/spec_media_type.rb
321
+ - test/spec_method_override.rb
277
322
  - test/spec_mime.rb
323
+ - test/spec_mock.rb
324
+ - test/spec_multipart.rb
325
+ - test/spec_null_logger.rb
278
326
  - test/spec_recursive.rb
279
- - test/spec_cgi.rb
280
- - test/spec_content_type.rb
281
327
  - test/spec_request.rb
282
- - test/spec_showstatus.rb
283
- - test/spec_chunked.rb
328
+ - test/spec_response.rb
329
+ - test/spec_rewindable_input.rb
284
330
  - test/spec_runtime.rb
285
- - test/spec_session_persisted_secure_secure_session_hash.rb
286
- - test/spec_fastcgi.rb
287
- - test/spec_builder.rb
288
- - test/spec_config.rb
289
- - test/spec_mongrel.rb
290
- - test/spec_utils.rb
291
331
  - test/spec_sendfile.rb
292
- - test/spec_lobster.rb
293
- - test/spec_lint.rb
294
- - test/spec_tempfile_reaper.rb
295
- - test/spec_mock.rb
296
- - test/spec_conditionalget.rb
297
332
  - test/spec_server.rb
298
- - test/spec_directory.rb
299
- - test/spec_webrick.rb
300
- - test/spec_response.rb
301
- - test/spec_file.rb
302
- - test/spec_body_proxy.rb
303
- - test/spec_logger.rb
304
- - test/spec_auth_digest.rb
305
- - test/spec_urlmap.rb
306
- - test/spec_nulllogger.rb
307
- - test/spec_cascade.rb
308
- - test/spec_auth_basic.rb
309
- - test/spec_head.rb
310
- - test/spec_lock.rb
311
- - test/spec_rewindable_input.rb
333
+ - test/spec_session_abstract_id.rb
334
+ - test/spec_session_abstract_session_hash.rb
335
+ - test/spec_session_cookie.rb
312
336
  - test/spec_session_memcache.rb
313
- - test/spec_content_length.rb
337
+ - test/spec_session_pool.rb
338
+ - test/spec_show_exceptions.rb
339
+ - test/spec_show_status.rb
340
+ - test/spec_static.rb
341
+ - test/spec_tempfile_reaper.rb
342
+ - test/spec_thin.rb
343
+ - test/spec_urlmap.rb
344
+ - test/spec_utils.rb
345
+ - test/spec_version.rb
346
+ - test/spec_webrick.rb
347
+ has_rdoc:
data/KNOWN-ISSUES DELETED
@@ -1,44 +0,0 @@
1
- = Known issues with Rack and ECMA-262
2
-
3
- * Many users expect the escape() function defined in ECMA-262 to be compatible
4
- with URI. Confusion is especially strong because the documentation for the
5
- escape function includes a reference to the URI specifications. ECMA-262
6
- escape is not however a URI escape function, it is a javascript escape
7
- function, and is not fully compatible. Most notably, for characters outside of
8
- the BMP. Users should use the more correct encodeURI functions.
9
-
10
- = Known issues with Rack and Web servers
11
-
12
- * Lighttpd sets wrong SCRIPT_NAME and PATH_INFO if you mount your
13
- FastCGI app at "/". This can be fixed by using this middleware:
14
-
15
- class LighttpdScriptNameFix
16
- def initialize(app)
17
- @app = app
18
- end
19
-
20
- def call(env)
21
- env["PATH_INFO"] = env["SCRIPT_NAME"].to_s + env["PATH_INFO"].to_s
22
- env["SCRIPT_NAME"] = ""
23
- @app.call(env)
24
- end
25
- end
26
-
27
- Of course, use this only when your app runs at "/".
28
-
29
- Since lighttpd 1.4.23, you also can use the "fix-root-scriptname" flag
30
- in fastcgi.server.
31
-
32
- = Known conflicts regarding parameter parsing
33
-
34
- * Many users have differing opinions about parameter parsing. The current
35
- parameter parsers in Rack are based on a combination of the HTTP and CGI
36
- specs, and are intended to round-trip encoding and decoding. There are some
37
- choices that may be viewed as deficiencies, specifically:
38
- - Rack does not create implicit arrays for multiple instances of a parameter
39
- - Rack returns nil when a value is not given
40
- - Rack does not support multi-type keys in parameters
41
- These issues or choices, will not be fixed before 2.0, if at all. They are
42
- very major breaking changes. Users are free to write alternative parameter
43
- parsers, and their own Request and Response wrappers. Moreover, users are
44
- encouraged to do so.