rack 2.0.6 → 2.2.7

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 (190) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +735 -0
  3. data/CONTRIBUTING.md +136 -0
  4. data/{COPYING → MIT-LICENSE} +4 -2
  5. data/README.rdoc +163 -145
  6. data/Rakefile +37 -23
  7. data/{SPEC → SPEC.rdoc} +29 -5
  8. data/bin/rackup +1 -0
  9. data/example/lobster.ru +2 -0
  10. data/example/protectedlobster.rb +3 -1
  11. data/example/protectedlobster.ru +2 -0
  12. data/lib/rack/auth/abstract/handler.rb +3 -1
  13. data/lib/rack/auth/abstract/request.rb +1 -1
  14. data/lib/rack/auth/basic.rb +7 -4
  15. data/lib/rack/auth/digest/md5.rb +13 -11
  16. data/lib/rack/auth/digest/nonce.rb +6 -3
  17. data/lib/rack/auth/digest/params.rb +4 -2
  18. data/lib/rack/auth/digest/request.rb +5 -3
  19. data/lib/rack/body_proxy.rb +15 -14
  20. data/lib/rack/builder.rb +116 -23
  21. data/lib/rack/cascade.rb +28 -12
  22. data/lib/rack/chunked.rb +68 -20
  23. data/lib/rack/common_logger.rb +36 -25
  24. data/lib/rack/conditional_get.rb +20 -16
  25. data/lib/rack/config.rb +2 -0
  26. data/lib/rack/content_length.rb +8 -7
  27. data/lib/rack/content_type.rb +5 -4
  28. data/lib/rack/core_ext/regexp.rb +14 -0
  29. data/lib/rack/deflater.rb +59 -34
  30. data/lib/rack/directory.rb +84 -64
  31. data/lib/rack/etag.rb +7 -4
  32. data/lib/rack/events.rb +19 -20
  33. data/lib/rack/file.rb +4 -173
  34. data/lib/rack/files.rb +218 -0
  35. data/lib/rack/handler/cgi.rb +2 -3
  36. data/lib/rack/handler/fastcgi.rb +4 -4
  37. data/lib/rack/handler/lsws.rb +3 -3
  38. data/lib/rack/handler/scgi.rb +9 -8
  39. data/lib/rack/handler/thin.rb +3 -3
  40. data/lib/rack/handler/webrick.rb +15 -6
  41. data/lib/rack/handler.rb +7 -2
  42. data/lib/rack/head.rb +1 -1
  43. data/lib/rack/lint.rb +72 -26
  44. data/lib/rack/lobster.rb +10 -10
  45. data/lib/rack/lock.rb +2 -1
  46. data/lib/rack/logger.rb +2 -0
  47. data/lib/rack/media_type.rb +10 -5
  48. data/lib/rack/method_override.rb +5 -3
  49. data/lib/rack/mime.rb +9 -1
  50. data/lib/rack/mock.rb +97 -20
  51. data/lib/rack/multipart/generator.rb +17 -13
  52. data/lib/rack/multipart/parser.rb +74 -67
  53. data/lib/rack/multipart/uploaded_file.rb +15 -7
  54. data/lib/rack/multipart.rb +6 -5
  55. data/lib/rack/null_logger.rb +2 -0
  56. data/lib/rack/query_parser.rb +59 -30
  57. data/lib/rack/recursive.rb +7 -5
  58. data/lib/rack/reloader.rb +8 -4
  59. data/lib/rack/request.rb +222 -63
  60. data/lib/rack/response.rb +127 -44
  61. data/lib/rack/rewindable_input.rb +4 -3
  62. data/lib/rack/runtime.rb +6 -4
  63. data/lib/rack/sendfile.rb +13 -9
  64. data/lib/rack/server.rb +95 -24
  65. data/lib/rack/session/abstract/id.rb +100 -22
  66. data/lib/rack/session/cookie.rb +22 -14
  67. data/lib/rack/session/memcache.rb +4 -87
  68. data/lib/rack/session/pool.rb +18 -9
  69. data/lib/rack/show_exceptions.rb +21 -17
  70. data/lib/rack/show_status.rb +9 -9
  71. data/lib/rack/static.rb +23 -11
  72. data/lib/rack/tempfile_reaper.rb +1 -1
  73. data/lib/rack/urlmap.rb +13 -7
  74. data/lib/rack/utils.rb +127 -119
  75. data/lib/rack/version.rb +29 -0
  76. data/lib/rack.rb +67 -73
  77. data/rack.gemspec +40 -28
  78. metadata +39 -181
  79. data/HISTORY.md +0 -505
  80. data/test/builder/an_underscore_app.rb +0 -5
  81. data/test/builder/anything.rb +0 -5
  82. data/test/builder/comment.ru +0 -4
  83. data/test/builder/end.ru +0 -5
  84. data/test/builder/line.ru +0 -1
  85. data/test/builder/options.ru +0 -2
  86. data/test/cgi/assets/folder/test.js +0 -1
  87. data/test/cgi/assets/fonts/font.eot +0 -1
  88. data/test/cgi/assets/images/image.png +0 -1
  89. data/test/cgi/assets/index.html +0 -1
  90. data/test/cgi/assets/javascripts/app.js +0 -1
  91. data/test/cgi/assets/stylesheets/app.css +0 -1
  92. data/test/cgi/lighttpd.conf +0 -26
  93. data/test/cgi/rackup_stub.rb +0 -6
  94. data/test/cgi/sample_rackup.ru +0 -5
  95. data/test/cgi/test +0 -9
  96. data/test/cgi/test+directory/test+file +0 -1
  97. data/test/cgi/test.fcgi +0 -9
  98. data/test/cgi/test.gz +0 -0
  99. data/test/cgi/test.ru +0 -5
  100. data/test/gemloader.rb +0 -10
  101. data/test/helper.rb +0 -34
  102. data/test/multipart/bad_robots +0 -259
  103. data/test/multipart/binary +0 -0
  104. data/test/multipart/content_type_and_no_filename +0 -6
  105. data/test/multipart/empty +0 -10
  106. data/test/multipart/fail_16384_nofile +0 -814
  107. data/test/multipart/file1.txt +0 -1
  108. data/test/multipart/filename_and_modification_param +0 -7
  109. data/test/multipart/filename_and_no_name +0 -6
  110. data/test/multipart/filename_with_encoded_words +0 -7
  111. data/test/multipart/filename_with_escaped_quotes +0 -6
  112. data/test/multipart/filename_with_escaped_quotes_and_modification_param +0 -7
  113. data/test/multipart/filename_with_null_byte +0 -7
  114. data/test/multipart/filename_with_percent_escaped_quotes +0 -6
  115. data/test/multipart/filename_with_single_quote +0 -7
  116. data/test/multipart/filename_with_unescaped_percentages +0 -6
  117. data/test/multipart/filename_with_unescaped_percentages2 +0 -6
  118. data/test/multipart/filename_with_unescaped_percentages3 +0 -6
  119. data/test/multipart/filename_with_unescaped_quotes +0 -6
  120. data/test/multipart/ie +0 -6
  121. data/test/multipart/invalid_character +0 -6
  122. data/test/multipart/mixed_files +0 -21
  123. data/test/multipart/nested +0 -10
  124. data/test/multipart/none +0 -9
  125. data/test/multipart/quoted +0 -15
  126. data/test/multipart/rack-logo.png +0 -0
  127. data/test/multipart/semicolon +0 -6
  128. data/test/multipart/text +0 -15
  129. data/test/multipart/three_files_three_fields +0 -31
  130. data/test/multipart/unity3d_wwwform +0 -11
  131. data/test/multipart/webkit +0 -32
  132. data/test/rackup/config.ru +0 -31
  133. data/test/registering_handler/rack/handler/registering_myself.rb +0 -8
  134. data/test/spec_auth_basic.rb +0 -89
  135. data/test/spec_auth_digest.rb +0 -260
  136. data/test/spec_body_proxy.rb +0 -85
  137. data/test/spec_builder.rb +0 -233
  138. data/test/spec_cascade.rb +0 -63
  139. data/test/spec_cgi.rb +0 -84
  140. data/test/spec_chunked.rb +0 -103
  141. data/test/spec_common_logger.rb +0 -95
  142. data/test/spec_conditional_get.rb +0 -103
  143. data/test/spec_config.rb +0 -23
  144. data/test/spec_content_length.rb +0 -86
  145. data/test/spec_content_type.rb +0 -46
  146. data/test/spec_deflater.rb +0 -375
  147. data/test/spec_directory.rb +0 -148
  148. data/test/spec_etag.rb +0 -108
  149. data/test/spec_events.rb +0 -133
  150. data/test/spec_fastcgi.rb +0 -85
  151. data/test/spec_file.rb +0 -264
  152. data/test/spec_handler.rb +0 -57
  153. data/test/spec_head.rb +0 -46
  154. data/test/spec_lint.rb +0 -515
  155. data/test/spec_lobster.rb +0 -59
  156. data/test/spec_lock.rb +0 -204
  157. data/test/spec_logger.rb +0 -24
  158. data/test/spec_media_type.rb +0 -42
  159. data/test/spec_method_override.rb +0 -110
  160. data/test/spec_mime.rb +0 -51
  161. data/test/spec_mock.rb +0 -359
  162. data/test/spec_multipart.rb +0 -722
  163. data/test/spec_null_logger.rb +0 -21
  164. data/test/spec_recursive.rb +0 -75
  165. data/test/spec_request.rb +0 -1398
  166. data/test/spec_response.rb +0 -510
  167. data/test/spec_rewindable_input.rb +0 -128
  168. data/test/spec_runtime.rb +0 -50
  169. data/test/spec_sendfile.rb +0 -125
  170. data/test/spec_server.rb +0 -193
  171. data/test/spec_session_abstract_id.rb +0 -31
  172. data/test/spec_session_abstract_session_hash.rb +0 -45
  173. data/test/spec_session_cookie.rb +0 -442
  174. data/test/spec_session_memcache.rb +0 -320
  175. data/test/spec_session_pool.rb +0 -210
  176. data/test/spec_show_exceptions.rb +0 -93
  177. data/test/spec_show_status.rb +0 -104
  178. data/test/spec_static.rb +0 -184
  179. data/test/spec_tempfile_reaper.rb +0 -64
  180. data/test/spec_thin.rb +0 -96
  181. data/test/spec_urlmap.rb +0 -237
  182. data/test/spec_utils.rb +0 -742
  183. data/test/spec_version.rb +0 -11
  184. data/test/spec_webrick.rb +0 -206
  185. data/test/static/another/index.html +0 -1
  186. data/test/static/foo.html +0 -1
  187. data/test/static/index.html +0 -1
  188. data/test/testrequest.rb +0 -78
  189. data/test/unregistered_handler/rack/handler/unregistered.rb +0 -7
  190. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -7
data/HISTORY.md DELETED
@@ -1,505 +0,0 @@
1
- Sun Dec 4 18:48:03 2015 Jeremy Daer <jeremydaer@gmail.com>
2
-
3
- * First-party "SameSite" cookies. Browsers omit SameSite cookies
4
- from third-party requests, closing the door on many CSRF attacks.
5
-
6
- Pass `same_site: true` (or `:strict`) to enable:
7
- response.set_cookie 'foo', value: 'bar', same_site: true
8
- or `same_site: :lax` to use Lax enforcement:
9
- response.set_cookie 'foo', value: 'bar', same_site: :lax
10
-
11
- Based on version 7 of the Same-site Cookies internet draft:
12
- https://tools.ietf.org/html/draft-west-first-party-cookies-07
13
-
14
- Thanks to Ben Toews (@mastahyeti) and Bob Long (@bobjflong) for
15
- updating to drafts 5 and 7.
16
-
17
- Tue Nov 3 16:17:26 2015 Aaron Patterson <tenderlove@ruby-lang.org>
18
-
19
- * Add `Rack::Events` middleware for adding event based middleware:
20
- middleware that does not care about the response body, but only cares
21
- about doing work at particular points in the request / response
22
- lifecycle.
23
-
24
- Thu Oct 8 14:58:46 2015 Aaron Patterson <tenderlove@ruby-lang.org>
25
-
26
- * Add `Rack::Request#authority` to calculate the authority under which
27
- the response is being made (this will be handy for h2 pushes).
28
-
29
- Tue Oct 6 13:19:04 2015 Aaron Patterson <tenderlove@ruby-lang.org>
30
-
31
- * Add `Rack::Response::Helpers#cache_control` and `cache_control=`.
32
- Use this for setting cache control headers on your response objects.
33
-
34
- Tue Oct 6 13:12:21 2015 Aaron Patterson <tenderlove@ruby-lang.org>
35
-
36
- * Add `Rack::Response::Helpers#etag` and `etag=`. Use this for
37
- setting etag values on the response.
38
-
39
- Sun Oct 3 18:25:03 2015 Jeremy Daer <jeremydaer@gmail.com>
40
-
41
- * Introduce `Rack::Response::Helpers#add_header` to add a value to a
42
- multi-valued response header. Implemented in terms of other
43
- `Response#*_header` methods, so it's available to any response-like
44
- class that includes the `Helpers` module.
45
-
46
- * Add `Rack::Request#add_header` to match.
47
-
48
- Fri Sep 4 18:34:53 2015 Aaron Patterson <tenderlove@ruby-lang.org>
49
-
50
- * `Rack::Session::Abstract::ID` IS DEPRECATED. Please switch to
51
- `Rack::Session::Abstract::Persisted`.
52
- `Rack::Session::Abstract::Persisted` uses a request object rather than
53
- the `env` hash.
54
-
55
- Fri Sep 4 17:32:12 2015 Aaron Patterson <tenderlove@ruby-lang.org>
56
-
57
- * Pull `ENV` access inside the request object in to a module. This
58
- will help with legacy Request objects that are ENV based but don't
59
- want to inherit from Rack::Request
60
-
61
- Fri Sep 4 16:09:11 2015 Aaron Patterson <tenderlove@ruby-lang.org>
62
-
63
- * Move most methods on the `Rack::Request` to a module
64
- `Rack::Request::Helpers` and use public API to get values from the
65
- request object. This enables users to mix `Rack::Request::Helpers` in
66
- to their own objects so they can implement
67
- `(get|set|fetch|each)_header` as they see fit (for example a proxy
68
- object).
69
-
70
- Fri Sep 4 14:15:32 2015 Aaron Patterson <tenderlove@ruby-lang.org>
71
-
72
- * Files and directories with + in the name are served correctly.
73
- Rather than unescaping paths like a form, we unescape with a URI
74
- parser using `Rack::Utils.unescape_path`. Fixes #265
75
-
76
- Thu Aug 27 15:43:48 2015 Aaron Patterson <tenderlove@ruby-lang.org>
77
-
78
- * Tempfiles are automatically closed in the case that there were too
79
- many posted.
80
-
81
- Thu Aug 27 11:00:03 2015 Aaron Patterson <tenderlove@ruby-lang.org>
82
-
83
- * Added methods for manipulating response headers that don't assume
84
- they're stored as a Hash. Response-like classes may include the
85
- Rack::Response::Helpers module if they define these methods:
86
-
87
- * Rack::Response#has_header?
88
- * Rack::Response#get_header
89
- * Rack::Response#set_header
90
- * Rack::Response#delete_header
91
-
92
- Mon Aug 24 18:05:23 2015 Aaron Patterson <tenderlove@ruby-lang.org>
93
-
94
- * Introduce Util.get_byte_ranges that will parse the value of the
95
- HTTP_RANGE string passed to it without depending on the `env` hash.
96
- `byte_ranges` is deprecated in favor of this method.
97
-
98
- Sat Aug 22 17:49:49 2015 Aaron Patterson <tenderlove@ruby-lang.org>
99
-
100
- * Change Session internals to use Request objects for looking up
101
- session information. This allows us to only allocate one request
102
- object when dealing with session objects (rather than doing it every
103
- time we need to manipulate cookies, etc).
104
-
105
- Fri Aug 21 16:30:51 2015 Aaron Patterson <tenderlove@ruby-lang.org>
106
-
107
- * Add `Rack::Request#initialize_copy` so that the env is duped when
108
- the request gets duped.
109
-
110
- Thu Aug 20 16:20:58 2015 Aaron Patterson <tenderlove@ruby-lang.org>
111
-
112
- * Added methods for manipulating request specific data. This includes
113
- data set as CGI parameters, and just any arbitrary data the user wants
114
- to associate with a particular request. New methods:
115
-
116
- * Rack::Request#has_header?
117
- * Rack::Request#get_header
118
- * Rack::Request#fetch_header
119
- * Rack::Request#each_header
120
- * Rack::Request#set_header
121
- * Rack::Request#delete_header
122
-
123
- Thu Jun 18 16:00:05 2015 Aaron Patterson <tenderlove@ruby-lang.org>
124
-
125
- * lib/rack/utils.rb: add a method for constructing "delete" cookie
126
- headers. This allows us to construct cookie headers without depending
127
- on the side effects of mutating a hash.
128
-
129
- Fri Jun 12 11:37:41 2015 Aaron Patterson <tenderlove@ruby-lang.org>
130
-
131
- * Prevent extremely deep parameters from being parsed. CVE-2015-3225
132
-
133
- ### May 6th, 2015, Thirty seventh public release 1.6.1
134
- - Fix CVE-2014-9490, denial of service attack in OkJson ([8cd610](https://github.com/rack/rack/commit/8cd61062954f70e0a03e2855704e95ff4bdd4f6e))
135
- - Use a monotonic time for Rack::Runtime, if available ([d170b2](https://github.com/rack/rack/commit/d170b2363c949dce60871f9d5a6bfc83da2bedb5))
136
- - RACK_MULTIPART_LIMIT changed to RACK_MULTIPART_PART_LIMIT (RACK_MULTIPART_LIMIT is deprecated and will be removed in 1.7.0) ([c096c5](https://github.com/rack/rack/commit/c096c50c00230d8eee13ad5f79ad027d9a3f3ca9))
137
- - See the full [git history](https://github.com/rack/rack/compare/1.6.0...1.6.1) and [milestone tag](https://github.com/rack/rack/issues?utf8=%E2%9C%93&q=milestone%3A%22Rack+1.6%22)
138
-
139
- ### May 6th, 2015, Thirty seventh public release 1.5.3
140
- - Fix CVE-2014-9490, denial of service attack in OkJson ([99f725](https://github.com/rack/rack/commit/99f725b583b357376ffbb7b3b042c5daa3106ad6))
141
- - Backport bug fixes to 1.5 series ([#585](https://github.com/rack/rack/pull/585), [#711](https://github.com/rack/rack/pull/711), [#756](https://github.com/rack/rack/pull/756))
142
- - See the full [git history](https://github.com/rack/rack/compare/1.5.2...1.5.3) and [milestone tag](https://github.com/rack/rack/issues?utf8=%E2%9C%93&q=milestone%3A%22Rack+1.5.3%22)
143
-
144
- ### December 18th, 2014, Thirty sixth public release 1.6.0
145
- - Response#unauthorized? helper ([#580](https://github.com/rack/rack/pull/580))
146
- - Deflater now accepts an options hash to control compression on a per-request level ([#457](https://github.com/rack/rack/pull/457))
147
- - Builder#warmup method for app preloading ([#617](https://github.com/rack/rack/pull/617))
148
- - Request#accept_language method to extract HTTP_ACCEPT_LANGUAGE ([#623](https://github.com/rack/rack/pull/623))
149
- - Add quiet mode of rack server, rackup --quiet ([#674](https://github.com/rack/rack/pull/674))
150
- - Update HTTP Status Codes to RFC 7231 ([#754](https://github.com/rack/rack/pull/754))
151
- - Less strict header name validation according to [RFC 2616](https://tools.ietf.org/html/rfc2616) ([#399](https://github.com/rack/rack/pull/399))
152
- - SPEC updated to specify headers conform to RFC7230 specification ([6839fc](https://github.com/rack/rack/commit/6839fc203339f021cb3267fb09cba89410f086e9))
153
- - Etag correctly marks etags as weak ([#681](https://github.com/rack/rack/issues/681))
154
- - Request#port supports multiple x-http-forwarded-proto values ([#669](https://github.com/rack/rack/pull/669))
155
- - Utils#multipart_part_limit configures the maximum number of parts a request can contain ([#684](https://github.com/rack/rack/pull/684))
156
- - Default host to localhost when in development mode ([#514](https://github.com/rack/rack/pull/514))
157
- - Various bugfixes and performance improvements (See the full [git history](https://github.com/rack/rack/compare/1.5.2...1.6.0) and [milestone tag](https://github.com/rack/rack/issues?utf8=%E2%9C%93&q=milestone%3A%22Rack+1.6%22))
158
-
159
- ### February 7th, 2013, Thirty fifth public release 1.5.2
160
- - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
161
- - Fix CVE-2013-0262, symlink path traversal in Rack::File
162
- - Add various methods to Session for enhanced Rails compatibility
163
- - Request#trusted_proxy? now only matches whole stirngs
164
- - Add JSON cookie coder, to be default in Rack 1.6+ due to security concerns
165
- - URLMap host matching in environments that don't set the Host header fixed
166
- - Fix a race condition that could result in overwritten pidfiles
167
- - Various documentation additions
168
-
169
- ### February 7th, 2013, Thirty fifth public release 1.4.5
170
- - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
171
- - Fix CVE-2013-0262, symlink path traversal in Rack::File
172
-
173
- ### February 7th, Thirty fifth public release 1.1.6, 1.2.8, 1.3.10
174
- - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
175
-
176
- ### January 28th, 2013: Thirty fourth public release 1.5.1
177
- - Rack::Lint check_hijack now conforms to other parts of SPEC
178
- - Added hash-like methods to Abstract::ID::SessionHash for compatibility
179
- - Various documentation corrections
180
-
181
- ### January 21st, 2013: Thirty third public release 1.5.0
182
- - Introduced hijack SPEC, for before-response and after-response hijacking
183
- - SessionHash is no longer a Hash subclass
184
- - Rack::File cache_control parameter is removed, in place of headers options
185
- - Rack::Auth::AbstractRequest#scheme now yields strings, not symbols
186
- - Rack::Utils cookie functions now format expires in RFC 2822 format
187
- - Rack::File now has a default mime type
188
- - rackup -b 'run Rack::File.new(".")', option provides command line configs
189
- - Rack::Deflater will no longer double encode bodies
190
- - Rack::Mime#match? provides convenience for Accept header matching
191
- - Rack::Utils#q_values provides splitting for Accept headers
192
- - Rack::Utils#best_q_match provides a helper for Accept headers
193
- - Rack::Handler.pick provides convenience for finding available servers
194
- - Puma added to the list of default servers (preferred over Webrick)
195
- - Various middleware now correctly close body when replacing it
196
- - Rack::Request#params is no longer persistent with only GET params
197
- - Rack::Request#update_param and #delete_param provide persistent operations
198
- - Rack::Request#trusted_proxy? now returns true for local unix sockets
199
- - Rack::Response no longer forces Content-Types
200
- - Rack::Sendfile provides local mapping configuration options
201
- - Rack::Utils#rfc2109 provides old netscape style time output
202
- - Updated HTTP status codes
203
- - Ruby 1.8.6 likely no longer passes tests, and is no longer fully supported
204
-
205
- ### January 13th, 2013: Thirty second public release 1.4.4, 1.3.9, 1.2.7, 1.1.5
206
- - [SEC] Rack::Auth::AbstractRequest no longer symbolizes arbitrary strings
207
- - Fixed erroneous test case in the 1.3.x series
208
-
209
- ### January 7th, 2013: Thirty first public release 1.4.3
210
- - Security: Prevent unbounded reads in large multipart boundaries
211
-
212
- ### January 7th, 2013: Thirtieth public release 1.3.8
213
- - Security: Prevent unbounded reads in large multipart boundaries
214
-
215
- ### January 6th, 2013: Twenty ninth public release 1.4.2
216
- - Add warnings when users do not provide a session secret
217
- - Fix parsing performance for unquoted filenames
218
- - Updated URI backports
219
- - Fix URI backport version matching, and silence constant warnings
220
- - Correct parameter parsing with empty values
221
- - Correct rackup '-I' flag, to allow multiple uses
222
- - Correct rackup pidfile handling
223
- - Report rackup line numbers correctly
224
- - Fix request loops caused by non-stale nonces with time limits
225
- - Fix reloader on Windows
226
- - Prevent infinite recursions from Response#to_ary
227
- - Various middleware better conforms to the body close specification
228
- - Updated language for the body close specification
229
- - Additional notes regarding ECMA escape compatibility issues
230
- - Fix the parsing of multiple ranges in range headers
231
- - Prevent errors from empty parameter keys
232
- - Added PATCH verb to Rack::Request
233
- - Various documentation updates
234
- - Fix session merge semantics (fixes rack-test)
235
- - Rack::Static :index can now handle multiple directories
236
- - All tests now utilize Rack::Lint (special thanks to Lars Gierth)
237
- - Rack::File cache_control parameter is now deprecated, and removed by 1.5
238
- - Correct Rack::Directory script name escaping
239
- - Rack::Static supports header rules for sophisticated configurations
240
- - Multipart parsing now works without a Content-Length header
241
- - New logos courtesy of Zachary Scott!
242
- - Rack::BodyProxy now explicitly defines #each, useful for C extensions
243
- - Cookies that are not URI escaped no longer cause exceptions
244
-
245
- ### January 6th, 2013: Twenty eighth public release 1.3.7
246
- - Add warnings when users do not provide a session secret
247
- - Fix parsing performance for unquoted filenames
248
- - Updated URI backports
249
- - Fix URI backport version matching, and silence constant warnings
250
- - Correct parameter parsing with empty values
251
- - Correct rackup '-I' flag, to allow multiple uses
252
- - Correct rackup pidfile handling
253
- - Report rackup line numbers correctly
254
- - Fix request loops caused by non-stale nonces with time limits
255
- - Fix reloader on Windows
256
- - Prevent infinite recursions from Response#to_ary
257
- - Various middleware better conforms to the body close specification
258
- - Updated language for the body close specification
259
- - Additional notes regarding ECMA escape compatibility issues
260
- - Fix the parsing of multiple ranges in range headers
261
-
262
- ### January 6th, 2013: Twenty seventh public release 1.2.6
263
- - Add warnings when users do not provide a session secret
264
- - Fix parsing performance for unquoted filenames
265
-
266
- ### January 6th, 2013: Twenty sixth public release 1.1.4
267
- - Add warnings when users do not provide a session secret
268
-
269
- ### January 22nd, 2012: Twenty fifth public release 1.4.1
270
- - Alter the keyspace limit calculations to reduce issues with nested params
271
- - Add a workaround for multipart parsing where files contain unescaped "%"
272
- - Added Rack::Response::Helpers#method_not_allowed? (code 405)
273
- - Rack::File now returns 404 for illegal directory traversals
274
- - Rack::File now returns 405 for illegal methods (non HEAD/GET)
275
- - Rack::Cascade now catches 405 by default, as well as 404
276
- - Cookies missing '--' no longer cause an exception to be raised
277
- - Various style changes and documentation spelling errors
278
- - Rack::BodyProxy always ensures to execute its block
279
- - Additional test coverage around cookies and secrets
280
- - Rack::Session::Cookie can now be supplied either secret or old_secret
281
- - Tests are no longer dependent on set order
282
- - Rack::Static no longer defaults to serving index files
283
- - Rack.release was fixed
284
-
285
- ### December 28th, 2011: Twenty fourth public release 1.4.0
286
- - Ruby 1.8.6 support has officially been dropped. Not all tests pass.
287
- - Raise sane error messages for broken config.ru
288
- - Allow combining run and map in a config.ru
289
- - Rack::ContentType will not set Content-Type for responses without a body
290
- - Status code 205 does not send a response body
291
- - Rack::Response::Helpers will not rely on instance variables
292
- - Rack::Utils.build_query no longer outputs '=' for nil query values
293
- - Various mime types added
294
- - Rack::MockRequest now supports HEAD
295
- - Rack::Directory now supports files that contain RFC3986 reserved chars
296
- - Rack::File now only supports GET and HEAD requests
297
- - Rack::Server#start now passes the block to Rack::Handler::<h>#run
298
- - Rack::Static now supports an index option
299
- - Added the Teapot status code
300
- - rackup now defaults to Thin instead of Mongrel (if installed)
301
- - Support added for HTTP_X_FORWARDED_SCHEME
302
- - Numerous bug fixes, including many fixes for new and alternate rubies
303
-
304
- ### December 28th, 2011: Twenty first public release: 1.1.3.
305
- - Security fix. http://www.ocert.org/advisories/ocert-2011-003.html
306
- Further information here: http://jruby.org/2011/12/27/jruby-1-6-5-1
307
-
308
- ### October 17, 2011: Twentieth public release 1.3.5
309
- - Fix annoying warnings caused by the backport in 1.3.4
310
-
311
- ### October 1, 2011: Nineteenth public release 1.3.4
312
- - Backport security fix from 1.9.3, also fixes some roundtrip issues in URI
313
- - Small documentation update
314
- - Fix an issue where BodyProxy could cause an infinite recursion
315
- - Add some supporting files for travis-ci
316
-
317
- ### September 16, 2011: Eighteenth public release 1.2.4
318
- - Fix a bug with MRI regex engine to prevent XSS by malformed unicode
319
-
320
- ### September 16, 2011: Seventeenth public release 1.3.3
321
- - Fix bug with broken query parameters in Rack::ShowExceptions
322
- - Rack::Request#cookies no longer swallows exceptions on broken input
323
- - Prevents XSS attacks enabled by bug in Ruby 1.8's regexp engine
324
- - Rack::ConditionalGet handles broken If-Modified-Since helpers
325
-
326
- ### July 16, 2011: Sixteenth public release 1.3.2
327
- - Fix for Rails and rack-test, Rack::Utils#escape calls to_s
328
-
329
- ### July 13, 2011: Fifteenth public release 1.3.1
330
- - Fix 1.9.1 support
331
- - Fix JRuby support
332
- - Properly handle $KCODE in Rack::Utils.escape
333
- - Make method_missing/respond_to behavior consistent for Rack::Lock,
334
- Rack::Auth::Digest::Request and Rack::Multipart::UploadedFile
335
- - Reenable passing rack.session to session middleware
336
- - Rack::CommonLogger handles streaming responses correctly
337
- - Rack::MockResponse calls close on the body object
338
- - Fix a DOS vector from MRI stdlib backport
339
-
340
- ### May 22nd, 2011: Fourteenth public release 1.2.3
341
- - Pulled in relevant bug fixes from 1.3
342
- - Fixed 1.8.6 support
343
-
344
- ### May 22nd, 2011: Thirteenth public release 1.3.0
345
- - Various performance optimizations
346
- - Various multipart fixes
347
- - Various multipart refactors
348
- - Infinite loop fix for multipart
349
- - Test coverage for Rack::Server returns
350
- - Allow files with '..', but not path components that are '..'
351
- - rackup accepts handler-specific options on the command line
352
- - Request#params no longer merges POST into GET (but returns the same)
353
- - Use URI.encode_www_form_component instead. Use core methods for escaping.
354
- - Allow multi-line comments in the config file
355
- - Bug L#94 reported by Nikolai Lugovoi, query parameter unescaping.
356
- - Rack::Response now deletes Content-Length when appropriate
357
- - Rack::Deflater now supports streaming
358
- - Improved Rack::Handler loading and searching
359
- - Support for the PATCH verb
360
- - env['rack.session.options'] now contains session options
361
- - Cookies respect renew
362
- - Session middleware uses SecureRandom.hex
363
-
364
- ### March 13th, 2011: Twelfth public release 1.2.2/1.1.2.
365
- - Security fix in Rack::Auth::Digest::MD5: when authenticator
366
- returned nil, permission was granted on empty password.
367
-
368
- ### June 15th, 2010: Eleventh public release 1.2.1.
369
- - Make CGI handler rewindable
370
- - Rename spec/ to test/ to not conflict with SPEC on lesser
371
- operating systems
372
-
373
- ### June 13th, 2010: Tenth public release 1.2.0.
374
- - Removed Camping adapter: Camping 2.0 supports Rack as-is
375
- - Removed parsing of quoted values
376
- - Add Request.trace? and Request.options?
377
- - Add mime-type for .webm and .htc
378
- - Fix HTTP_X_FORWARDED_FOR
379
- - Various multipart fixes
380
- - Switch test suite to bacon
381
-
382
- ### January 3rd, 2010: Ninth public release 1.1.0.
383
- - Moved Auth::OpenID to rack-contrib.
384
- - SPEC change that relaxes Lint slightly to allow subclasses of the
385
- required types
386
- - SPEC change to document rack.input binary mode in greator detail
387
- - SPEC define optional rack.logger specification
388
- - File servers support X-Cascade header
389
- - Imported Config middleware
390
- - Imported ETag middleware
391
- - Imported Runtime middleware
392
- - Imported Sendfile middleware
393
- - New Logger and NullLogger middlewares
394
- - Added mime type for .ogv and .manifest.
395
- - Don't squeeze PATH_INFO slashes
396
- - Use Content-Type to determine POST params parsing
397
- - Update Rack::Utils::HTTP_STATUS_CODES hash
398
- - Add status code lookup utility
399
- - Response should call #to_i on the status
400
- - Add Request#user_agent
401
- - Request#host knows about forwared host
402
- - Return an empty string for Request#host if HTTP_HOST and
403
- SERVER_NAME are both missing
404
- - Allow MockRequest to accept hash params
405
- - Optimizations to HeaderHash
406
- - Refactored rackup into Rack::Server
407
- - Added Utils.build_nested_query to complement Utils.parse_nested_query
408
- - Added Utils::Multipart.build_multipart to complement
409
- Utils::Multipart.parse_multipart
410
- - Extracted set and delete cookie helpers into Utils so they can be
411
- used outside Response
412
- - Extract parse_query and parse_multipart in Request so subclasses
413
- can change their behavior
414
- - Enforce binary encoding in RewindableInput
415
- - Set correct external_encoding for handlers that don't use RewindableInput
416
-
417
- ### October 18th, 2009: Eighth public release 1.0.1.
418
- - Bump remainder of rack.versions.
419
- - Support the pure Ruby FCGI implementation.
420
- - Fix for form names containing "=": split first then unescape components
421
- - Fixes the handling of the filename parameter with semicolons in names.
422
- - Add anchor to nested params parsing regexp to prevent stack overflows
423
- - Use more compatible gzip write api instead of "<<".
424
- - Make sure that Reloader doesn't break when executed via ruby -e
425
- - Make sure WEBrick respects the :Host option
426
- - Many Ruby 1.9 fixes.
427
-
428
- ### April 25th, 2009: Seventh public release 1.0.0.
429
- - SPEC change: Rack::VERSION has been pushed to [1,0].
430
- - SPEC change: header values must be Strings now, split on "\n".
431
- - SPEC change: Content-Length can be missing, in this case chunked transfer
432
- encoding is used.
433
- - SPEC change: rack.input must be rewindable and support reading into
434
- a buffer, wrap with Rack::RewindableInput if it isn't.
435
- - SPEC change: rack.session is now specified.
436
- - SPEC change: Bodies can now additionally respond to #to_path with
437
- a filename to be served.
438
- - NOTE: String bodies break in 1.9, use an Array consisting of a
439
- single String instead.
440
- - New middleware Rack::Lock.
441
- - New middleware Rack::ContentType.
442
- - Rack::Reloader has been rewritten.
443
- - Major update to Rack::Auth::OpenID.
444
- - Support for nested parameter parsing in Rack::Response.
445
- - Support for redirects in Rack::Response.
446
- - HttpOnly cookie support in Rack::Response.
447
- - The Rakefile has been rewritten.
448
- - Many bugfixes and small improvements.
449
-
450
- ### January 9th, 2009: Sixth public release 0.9.1.
451
- - Fix directory traversal exploits in Rack::File and Rack::Directory.
452
-
453
- ### January 6th, 2009: Fifth public release 0.9.
454
- - Rack is now managed by the Rack Core Team.
455
- - Rack::Lint is stricter and follows the HTTP RFCs more closely.
456
- - Added ConditionalGet middleware.
457
- - Added ContentLength middleware.
458
- - Added Deflater middleware.
459
- - Added Head middleware.
460
- - Added MethodOverride middleware.
461
- - Rack::Mime now provides popular MIME-types and their extension.
462
- - Mongrel Header now streams.
463
- - Added Thin handler.
464
- - Official support for swiftiplied Mongrel.
465
- - Secure cookies.
466
- - Made HeaderHash case-preserving.
467
- - Many bugfixes and small improvements.
468
-
469
- ### August 21st, 2008: Fourth public release 0.4.
470
- - New middleware, Rack::Deflater, by Christoffer Sawicki.
471
- - OpenID authentication now needs ruby-openid 2.
472
- - New Memcache sessions, by blink.
473
- - Explicit EventedMongrel handler, by Joshua Peek <josh@joshpeek.com>
474
- - Rack::Reloader is not loaded in rackup development mode.
475
- - rackup can daemonize with -D.
476
- - Many bugfixes, especially for pool sessions, URLMap, thread safety
477
- and tempfile handling.
478
- - Improved tests.
479
- - Rack moved to Git.
480
-
481
- ### February 26th, 2008: Third public release 0.3.
482
- - LiteSpeed handler, by Adrian Madrid.
483
- - SCGI handler, by Jeremy Evans.
484
- - Pool sessions, by blink.
485
- - OpenID authentication, by blink.
486
- - :Port and :File options for opening FastCGI sockets, by blink.
487
- - Last-Modified HTTP header for Rack::File, by blink.
488
- - Rack::Builder#use now accepts blocks, by Corey Jewett.
489
- (See example/protectedlobster.ru)
490
- - HTTP status 201 can contain a Content-Type and a body now.
491
- - Many bugfixes, especially related to Cookie handling.
492
-
493
- ### May 16th, 2007: Second public release 0.2.
494
- - HTTP Basic authentication.
495
- - Cookie Sessions.
496
- - Static file handler.
497
- - Improved Rack::Request.
498
- - Improved Rack::Response.
499
- - Added Rack::ShowStatus, for better default error messages.
500
- - Bug fixes in the Camping adapter.
501
- - Removed Rails adapter, was too alpha.
502
-
503
- ### March 3rd, 2007: First public release 0.1.
504
-
505
- /* vim: set filetype=changelog */
@@ -1,5 +0,0 @@
1
- class AnUnderscoreApp
2
- def self.call(env)
3
- [200, {'Content-Type' => 'text/plain'}, ['OK']]
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class Anything
2
- def self.call(env)
3
- [200, {'Content-Type' => 'text/plain'}, ['OK']]
4
- end
5
- end
@@ -1,4 +0,0 @@
1
- =begin
2
-
3
- =end
4
- run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
data/test/builder/end.ru DELETED
@@ -1,5 +0,0 @@
1
- run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
2
- __END__
3
- Should not be evaluated
4
- Neither should
5
- This
data/test/builder/line.ru DELETED
@@ -1 +0,0 @@
1
- run lambda{ |env| [200, {'Content-Type' => 'text/plain'}, [__LINE__.to_s]] }
@@ -1,2 +0,0 @@
1
- #\ -d -p 2929 --env test
2
- run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1,26 +0,0 @@
1
- server.modules = ("mod_fastcgi", "mod_cgi")
2
- server.document-root = "."
3
- server.errorlog = var.CWD + "/lighttpd.errors"
4
- server.port = 9203
5
- server.bind = "127.0.0.1"
6
-
7
- server.event-handler = "select"
8
-
9
- cgi.assign = ("/test" => "",
10
- # ".ru" => ""
11
- )
12
-
13
- fastcgi.server = (
14
- "test.fcgi" => ("localhost" =>
15
- ("min-procs" => 1,
16
- "socket" => "/tmp/rack-test-fcgi",
17
- "bin-path" => "test.fcgi")),
18
- "test.ru" => ("localhost" =>
19
- ("min-procs" => 1,
20
- "socket" => "/tmp/rack-test-ru-fcgi",
21
- "bin-path" => CWD + "/rackup_stub.rb test.ru")),
22
- "sample_rackup.ru" => ("localhost" =>
23
- ("min-procs" => 1,
24
- "socket" => "/tmp/rack-test-rackup-fcgi",
25
- "bin-path" => CWD + "/rackup_stub.rb sample_rackup.ru")),
26
- )
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- $:.unshift '../../lib'
5
- require 'rack'
6
- Rack::Server.start
@@ -1,5 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require '../testrequest'
4
-
5
- run Rack::Lint.new(TestRequest.new)
data/test/cgi/test DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- $: << File.join(File.dirname(__FILE__), "..", "..", "lib")
5
-
6
- require 'rack'
7
- require '../testrequest'
8
-
9
- Rack::Handler::CGI.run(Rack::Lint.new(TestRequest.new))
@@ -1 +0,0 @@
1
- this file has plusses!
data/test/cgi/test.fcgi DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- require 'uri'
5
- $:.unshift '../../lib'
6
- require 'rack'
7
- require '../testrequest'
8
-
9
- Rack::Handler::FastCGI.run(Rack::Lint.new(TestRequest.new))
data/test/cgi/test.gz DELETED
Binary file
data/test/cgi/test.ru DELETED
@@ -1,5 +0,0 @@
1
- #!../../bin/rackup
2
- # -*- ruby -*-
3
-
4
- require '../testrequest'
5
- run Rack::Lint.new(TestRequest.new)
data/test/gemloader.rb DELETED
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- project = 'rack'
3
- gemspec = File.expand_path("#{project}.gemspec", Dir.pwd)
4
- Gem::Specification.load(gemspec).dependencies.each do |dep|
5
- begin
6
- gem dep.name, *dep.requirement.as_list
7
- rescue Gem::LoadError
8
- warn "Cannot load #{dep.name} #{dep.requirement.to_s}"
9
- end
10
- end