rack 2.1.0 → 2.1.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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e12f073e1e04051923534a08cf31f175959a4217f1a793f43283e1bb902a7225
4
- data.tar.gz: e96008a1e0f77466d55c3834da7df2a4c640ec213306bab87e19bad5a9042c2c
3
+ metadata.gz: 4c636b399e2635a9c09098c5b9c7bc47488b2184d0283d21853616862bbadacd
4
+ data.tar.gz: fc4e151fe86e0752616e3e42b01f7f730250ab6cc55dc1bbe3452ed7bc92b507
5
5
  SHA512:
6
- metadata.gz: f73e64b61cd21153bb90d23811b28026caa652f8eb4c682ebc02d8d5967b537f07c08d3d1b6d70cc14482d687637a2e539b384b119eb5b9be0d40c994577a2e7
7
- data.tar.gz: 512be9498bf6b40a18a7c4d3bcce2e2bc1818185e30e522def5c9461cfaa8ad68282b09f6457f40a38779e7711b732cc9dc0b126f96b35f3b451b8709cc45f9b
6
+ metadata.gz: 416fca4689a96df477d6b90978470c34c68facfa7ce1ee48cc1956f47e9f7379d906ae661b1c78ff14ff565c19f16ca28e5dcbfef18e9f87c36f7fb5d781d54f
7
+ data.tar.gz: 8d400ae00dae63dc5afcb84aef13598b95892dce2d9bd3d2662da64c22dc97e28d30b125692c71547b0d41e44fb1628d1eba9cf5e42a834502353c7730acd872
@@ -1,10 +1,8 @@
1
- # Changelog
1
+ ## [2.1.1] - 2020-01-12
2
2
 
3
- All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
3
+ - Remove `Rack::Chunked` from `Rack::Server` default middleware. ([#1475](https://github.com/rack/rack/pull/1475), [@ioquatix](https://github.com/ioquatix))
4
4
 
5
- ## Unreleased
6
-
7
- _Note: There are many unreleased changes in Rack (`master` is around 300 commits ahead of `2-0-stable`), and below is not an exhaustive list. If you would like to help out and document some of the unreleased changes, PRs are welcome._
5
+ ## [2.1.0] - 2020-01-10
8
6
 
9
7
  ### Added
10
8
 
@@ -42,529 +40,21 @@ _Note: There are many unreleased changes in Rack (`master` is around 300 commits
42
40
  - Update codebase to avoid string mutations in preparation for `frozen_string_literals`. ([@pat](https://github.com/pat))
43
41
  - Change `MockRequest#env_for` to rely on the input optionally responding to `#size` instead of `#length`. ([@janko](https://github.com/janko))
44
42
  - Rename `Rack::File` -> `Rack::Files` and add deprecation notice. ([@postmodern](https://github.com/postmodern)).
43
+ - Prefer Base64 “strict encoding” for Base64 cookies. ([@ioquatix](https://github.com/ioquatix))
45
44
 
46
45
  ### Removed
47
46
 
48
47
  - Remove `to_ary` from Response ([@tenderlove](https://github.com/tenderlove))
49
48
  - Deprecate `Rack::Session::Memcache` in favor of `Rack::Session::Dalli` from dalli gem ([@fatkodima](https://github.com/fatkodima))
50
49
 
50
+ ### Fixed
51
+
52
+ - Eliminate warnings for Ruby 2.7. ([@osamtimizer](https://github.com/osamtimizer]))
53
+
51
54
  ### Documentation
52
55
 
53
56
  - Update broken example in `Session::Abstract::ID` documentation. ([tonytonyjan](https://github.com/tonytonyjan))
54
57
  - Add Padrino to the list of frameworks implmenting Rack. ([@wikimatze](https://github.com/wikimatze))
55
58
  - Remove Mongrel from the suggested server options in the help output. ([@tricknotes](https://github.com/tricknotes))
56
59
  - Replace `HISTORY.md` and `NEWS.md` with `CHANGELOG.md`. ([@twitnithegirl](https://github.com/twitnithegirl))
57
- - Backfill `CHANGELOG.md` from 2.0.1 to 2.0.7 releases. ([@drenmi](https://github.com/Drenmi))
58
-
59
- ## [2.0.8] - 2019-12-08
60
-
61
- - [[CVE-2019-16782](https://nvd.nist.gov/vuln/detail/CVE-2019-16782)] Prevent timing attacks targeted at session ID lookup. BREAKING CHANGE: Session ID is now a SessionId instance instead of a String. ([@tenderlove](https://github.com/tenderlove), [@rafaelfranca](https://github.com/rafaelfranca))
62
-
63
- ## [1.6.12] - 2019-12-08
64
-
65
- - [[CVE-2019-16782](https://nvd.nist.gov/vuln/detail/CVE-2019-16782)] Prevent timing attacks targeted at session ID lookup. BREAKING CHANGE: Session ID is now a SessionId instance instead of a String. ([@tenderlove](https://github.com/tenderlove), [@rafaelfranca](https://github.com/rafaelfranca))
66
-
67
- ## [2.0.7] - 2019-04-02
68
-
69
- ### Fixed
70
-
71
- - Remove calls to `#eof?` on Rack input in `Multipart::Parser`, as this breaks the specification. ([@matthewd](https://github.com/matthewd))
72
- - Preserve forwarded IP addresses for trusted proxy chains. ([@SamSaffron](https://github.com/SamSaffron))
73
-
74
- ## [2.0.6] - 2018-11-05
75
-
76
- ### Fixed
77
-
78
- - [[CVE-2018-16470](https://nvd.nist.gov/vuln/detail/CVE-2018-16470)] Reduce buffer size of `Multipart::Parser` to avoid pathological parsing. ([@tenderlove](https://github.com/tenderlove))
79
- - Fix a call to a non-existing method `#accepts_html` in the `ShowExceptions` middleware. ([@tomelm](https://github.com/tomelm))
80
- - [[CVE-2018-16471](https://nvd.nist.gov/vuln/detail/CVE-2018-16471)] Whitelist HTTP and HTTPS schemes in `Request#scheme` to prevent a possible XSS attack. ([@PatrickTulskie](https://github.com/PatrickTulskie))
81
-
82
- ## [2.0.5] - 2018-04-23
83
-
84
- ### Fixed
85
-
86
- - Record errors originating from invalid UTF8 in `MethodOverride` middleware instead of breaking. ([@mclark](https://github.com/mclark))
87
-
88
- ## [2.0.4] - 2018-01-31
89
-
90
- ### Changed
91
-
92
- - Ensure the `Lock` middleware passes the original `env` object. ([@lugray](https://github.com/lugray))
93
- - Improve performance of `Multipart::Parser` when uploading large files. ([@tompng](https://github.com/tompng))
94
- - Increase buffer size in `Multipart::Parser` for better performance. ([@jkowens](https://github.com/jkowens))
95
- - Reduce memory usage of `Multipart::Parser` when uploading large files. ([@tompng](https://github.com/tompng))
96
- - Replace ConcurrentRuby dependency with native `Queue`. ([@devmchakan](https://github.com/devmchakan))
97
-
98
- ### Fixed
99
-
100
- - Require the correct digest algorithm in the `ETag` middleware. ([@matthewd](https://github.com/matthewd))
101
-
102
- ### Documentation
103
-
104
- - Update homepage links to use SSL. ([@hugoabonizio](https://github.com/hugoabonizio))
105
-
106
- ## [2.0.3] - 2017-05-15
107
-
108
- ### Changed
109
-
110
- - Ensure `env` values are ASCII 8-bit encoded. ([@eileencodes](https://github.com/eileencodes))
111
-
112
- ### Fixed
113
-
114
- - Prevent exceptions when a class with mixins inherits from `Session::Abstract::ID`. ([@jnraine](https://github.com/jnraine))
115
-
116
- ## [2.0.2] - 2017-05-08
117
-
118
- ### Added
119
-
120
- - Allow `Session::Abstract::SessionHash#fetch` to accept a block with a default value. ([@yannvanhalewyn](https://github.com/yannvanhalewyn))
121
- - Add `Builder#freeze_app` to freeze application and all middleware. ([@jeremyevans](https://github.com/jeremyevans))
122
-
123
- ### Changed
124
-
125
- - Freeze default session options to avoid accidental mutation. ([@kirs](https://github.com/kirs))
126
- - Detect partial hijack without hash headers. ([@devmchakan](https://github.com/devmchakan))
127
- - Update tests to use MiniTest 6 matchers. ([@tonytonyjan](https://github.com/tonytonyjan))
128
- - Allow 205 Reset Content responses to set a Content-Length, as RFC 7231 proposes setting this to 0. ([@devmchakan](https://github.com/devmchakan))
129
-
130
- ### Fixed
131
-
132
- - Handle `NULL` bytes in multipart filenames. ([@casperisfine](https://github.com/casperisfine))
133
- - Remove warnings due to miscapitalized global. ([@ioquatix](https://github.com/ioquatix))
134
- - Prevent exceptions caused by a race condition on multi-threaded servers. ([@sophiedeziel](https://github.com/sophiedeziel))
135
- - Add RDoc as an explicit depencency for `doc` group. ([@tonytonyjan](https://github.com/tonytonyjan))
136
- - Record errors originating from `Multipart::Parser` in the `MethodOverride` middleware instead of letting them bubble up. ([@carlzulauf](https://github.com/carlzulauf))
137
- - Remove remaining use of removed `Utils#bytesize` method from the `File` middleware. ([@brauliomartinezlm](https://github.com/brauliomartinezlm))
138
-
139
- ### Removed
140
-
141
- - Remove `deflate` encoding support to reduce caching overhead. ([@devmchakan](https://github.com/devmchakan))
142
-
143
- ### Documentation
144
-
145
- - Update broken example in `Deflater` documentation. ([@mwpastore](https://github.com/mwpastore))
146
-
147
- ## [2.0.1] - 2016-06-30
148
-
149
- ### Changed
150
-
151
- - Remove JSON as an explicit dependency. ([@mperham](https://github.com/mperham))
152
-
153
-
154
- # History/News Archive
155
- Items below this line are from the previously maintained HISTORY.md and NEWS.md files.
156
-
157
- ## [2.0.0.rc1] 2016-05-06
158
- - Rack::Session::Abstract::ID is deprecated. Please change to use Rack::Session::Abstract::Persisted
159
-
160
- ## [2.0.0.alpha] 2015-12-04
161
- - First-party "SameSite" cookies. Browsers omit SameSite cookies from third-party requests, closing the door on many CSRF attacks.
162
- - Pass `same_site: true` (or `:strict`) to enable: response.set_cookie 'foo', value: 'bar', same_site: true or `same_site: :lax` to use Lax enforcement: response.set_cookie 'foo', value: 'bar', same_site: :lax
163
- - Based on version 7 of the Same-site Cookies internet draft:
164
- https://tools.ietf.org/html/draft-west-first-party-cookies-07
165
- - Thanks to Ben Toews (@mastahyeti) and Bob Long (@bobjflong) for updating to drafts 5 and 7.
166
- - Add `Rack::Events` middleware for adding event based middleware: middleware that does not care about the response body, but only cares about doing work at particular points in the request / response lifecycle.
167
- - Add `Rack::Request#authority` to calculate the authority under which the response is being made (this will be handy for h2 pushes).
168
- - Add `Rack::Response::Helpers#cache_control` and `cache_control=`. Use this for setting cache control headers on your response objects.
169
- - Add `Rack::Response::Helpers#etag` and `etag=`. Use this for setting etag values on the response.
170
- - Introduce `Rack::Response::Helpers#add_header` to add a value to a multi-valued response header. Implemented in terms of other `Response#*_header` methods, so it's available to any response-like class that includes the `Helpers` module.
171
- - Add `Rack::Request#add_header` to match.
172
- - `Rack::Session::Abstract::ID` IS DEPRECATED. Please switch to `Rack::Session::Abstract::Persisted`. `Rack::Session::Abstract::Persisted` uses a request object rather than the `env` hash.
173
- - Pull `ENV` access inside the request object in to a module. This will help with legacy Request objects that are ENV based but don't want to inherit from Rack::Request
174
- - Move most methods on the `Rack::Request` to a module `Rack::Request::Helpers` and use public API to get values from the request object. This enables users to mix `Rack::Request::Helpers` in to their own objects so they can implement `(get|set|fetch|each)_header` as they see fit (for example a proxy object).
175
- - Files and directories with + in the name are served correctly. Rather than unescaping paths like a form, we unescape with a URI parser using `Rack::Utils.unescape_path`. Fixes #265
176
- - Tempfiles are automatically closed in the case that there were too
177
- many posted.
178
- - Added methods for manipulating response headers that don't assume
179
- they're stored as a Hash. Response-like classes may include the
180
- Rack::Response::Helpers module if they define these methods:
181
- - Rack::Response#has_header?
182
- - Rack::Response#get_header
183
- - Rack::Response#set_header
184
- - Rack::Response#delete_header
185
- - Introduce Util.get_byte_ranges that will parse the value of the HTTP_RANGE string passed to it without depending on the `env` hash. `byte_ranges` is deprecated in favor of this method.
186
- - Change Session internals to use Request objects for looking up session information. This allows us to only allocate one request object when dealing with session objects (rather than doing it every time we need to manipulate cookies, etc).
187
- - Add `Rack::Request#initialize_copy` so that the env is duped when the request gets duped.
188
- - Added methods for manipulating request specific data. This includes
189
- data set as CGI parameters, and just any arbitrary data the user wants
190
- to associate with a particular request. New methods:
191
- - Rack::Request#has_header?
192
- - Rack::Request#get_header
193
- - Rack::Request#fetch_header
194
- - Rack::Request#each_header
195
- - Rack::Request#set_header
196
- - Rack::Request#delete_header
197
- - lib/rack/utils.rb: add a method for constructing "delete" cookie
198
- headers. This allows us to construct cookie headers without depending
199
- on the side effects of mutating a hash.
200
- - Prevent extremely deep parameters from being parsed. CVE-2015-3225
201
-
202
- ## [1.6.1] 2015-05-06
203
- - Fix CVE-2014-9490, denial of service attack in OkJson
204
- - Use a monotonic time for Rack::Runtime, if available
205
- - RACK_MULTIPART_LIMIT changed to RACK_MULTIPART_PART_LIMIT (RACK_MULTIPART_LIMIT is deprecated and will be removed in 1.7.0)
206
-
207
- ## [1.5.3] 2015-05-06
208
- - Fix CVE-2014-9490, denial of service attack in OkJson
209
- - Backport bug fixes to 1.5 series
210
-
211
- ## [1.6.0] 2014-01-18
212
- - Response#unauthorized? helper
213
- - Deflater now accepts an options hash to control compression on a per-request level
214
- - Builder#warmup method for app preloading
215
- - Request#accept_language method to extract HTTP_ACCEPT_LANGUAGE
216
- - Add quiet mode of rack server, rackup --quiet
217
- - Update HTTP Status Codes to RFC 7231
218
- - Less strict header name validation according to RFC 2616
219
- - SPEC updated to specify headers conform to RFC7230 specification
220
- - Etag correctly marks etags as weak
221
- - Request#port supports multiple x-http-forwarded-proto values
222
- - Utils#multipart_part_limit configures the maximum number of parts a request can contain
223
- - Default host to localhost when in development mode
224
- - Various bugfixes and performance improvements
225
-
226
- ## [1.5.2] 2013-02-07
227
- - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
228
- - Fix CVE-2013-0262, symlink path traversal in Rack::File
229
- - Add various methods to Session for enhanced Rails compatibility
230
- - Request#trusted_proxy? now only matches whole stirngs
231
- - Add JSON cookie coder, to be default in Rack 1.6+ due to security concerns
232
- - URLMap host matching in environments that don't set the Host header fixed
233
- - Fix a race condition that could result in overwritten pidfiles
234
- - Various documentation additions
235
-
236
- ## [1.4.5] 2013-02-07
237
- - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
238
- - Fix CVE-2013-0262, symlink path traversal in Rack::File
239
-
240
- ## [1.1.6, 1.2.8, 1.3.10] 2013-02-07
241
- - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
242
-
243
- ## [1.5.1] 2013-01-28
244
- - Rack::Lint check_hijack now conforms to other parts of SPEC
245
- - Added hash-like methods to Abstract::ID::SessionHash for compatibility
246
- - Various documentation corrections
247
-
248
- ## [1.5.0] 2013-01-21
249
- - Introduced hijack SPEC, for before-response and after-response hijacking
250
- - SessionHash is no longer a Hash subclass
251
- - Rack::File cache_control parameter is removed, in place of headers options
252
- - Rack::Auth::AbstractRequest#scheme now yields strings, not symbols
253
- - Rack::Utils cookie functions now format expires in RFC 2822 format
254
- - Rack::File now has a default mime type
255
- - rackup -b 'run Rack::Files.new(".")', option provides command line configs
256
- - Rack::Deflater will no longer double encode bodies
257
- - Rack::Mime#match? provides convenience for Accept header matching
258
- - Rack::Utils#q_values provides splitting for Accept headers
259
- - Rack::Utils#best_q_match provides a helper for Accept headers
260
- - Rack::Handler.pick provides convenience for finding available servers
261
- - Puma added to the list of default servers (preferred over Webrick)
262
- - Various middleware now correctly close body when replacing it
263
- - Rack::Request#params is no longer persistent with only GET params
264
- - Rack::Request#update_param and #delete_param provide persistent operations
265
- - Rack::Request#trusted_proxy? now returns true for local unix sockets
266
- - Rack::Response no longer forces Content-Types
267
- - Rack::Sendfile provides local mapping configuration options
268
- - Rack::Utils#rfc2109 provides old netscape style time output
269
- - Updated HTTP status codes
270
- - Ruby 1.8.6 likely no longer passes tests, and is no longer fully supported
271
-
272
- ## [1.4.4, 1.3.9, 1.2.7, 1.1.5] 2013-01-13
273
- - [SEC] Rack::Auth::AbstractRequest no longer symbolizes arbitrary strings
274
- - Fixed erroneous test case in the 1.3.x series
275
-
276
- ## [1.4.3] 2013-01-07
277
- - Security: Prevent unbounded reads in large multipart boundaries
278
-
279
- ## [1.3.8] 2013-01-07
280
- - Security: Prevent unbounded reads in large multipart boundaries
281
-
282
- ## [1.4.2] 2013-01-06
283
- - Add warnings when users do not provide a session secret
284
- - Fix parsing performance for unquoted filenames
285
- - Updated URI backports
286
- - Fix URI backport version matching, and silence constant warnings
287
- - Correct parameter parsing with empty values
288
- - Correct rackup '-I' flag, to allow multiple uses
289
- - Correct rackup pidfile handling
290
- - Report rackup line numbers correctly
291
- - Fix request loops caused by non-stale nonces with time limits
292
- - Fix reloader on Windows
293
- - Prevent infinite recursions from Response#to_ary
294
- - Various middleware better conforms to the body close specification
295
- - Updated language for the body close specification
296
- - Additional notes regarding ECMA escape compatibility issues
297
- - Fix the parsing of multiple ranges in range headers
298
- - Prevent errors from empty parameter keys
299
- - Added PATCH verb to Rack::Request
300
- - Various documentation updates
301
- - Fix session merge semantics (fixes rack-test)
302
- - Rack::Static :index can now handle multiple directories
303
- - All tests now utilize Rack::Lint (special thanks to Lars Gierth)
304
- - Rack::File cache_control parameter is now deprecated, and removed by 1.5
305
- - Correct Rack::Directory script name escaping
306
- - Rack::Static supports header rules for sophisticated configurations
307
- - Multipart parsing now works without a Content-Length header
308
- - New logos courtesy of Zachary Scott!
309
- - Rack::BodyProxy now explicitly defines #each, useful for C extensions
310
- - Cookies that are not URI escaped no longer cause exceptions
311
-
312
- ## [1.3.7] 2013-01-06
313
- - Add warnings when users do not provide a session secret
314
- - Fix parsing performance for unquoted filenames
315
- - Updated URI backports
316
- - Fix URI backport version matching, and silence constant warnings
317
- - Correct parameter parsing with empty values
318
- - Correct rackup '-I' flag, to allow multiple uses
319
- - Correct rackup pidfile handling
320
- - Report rackup line numbers correctly
321
- - Fix request loops caused by non-stale nonces with time limits
322
- - Fix reloader on Windows
323
- - Prevent infinite recursions from Response#to_ary
324
- - Various middleware better conforms to the body close specification
325
- - Updated language for the body close specification
326
- - Additional notes regarding ECMA escape compatibility issues
327
- - Fix the parsing of multiple ranges in range headers
328
-
329
- ## [1.2.6] 2013-01-06
330
- - Add warnings when users do not provide a session secret
331
- - Fix parsing performance for unquoted filenames
332
-
333
- ## [1.1.4] 2013-01-06
334
- - Add warnings when users do not provide a session secret
335
-
336
- ## [1.4.1] 2012-01-22
337
- - Alter the keyspace limit calculations to reduce issues with nested params
338
- - Add a workaround for multipart parsing where files contain unescaped "%"
339
- - Added Rack::Response::Helpers#method_not_allowed? (code 405)
340
- - Rack::File now returns 404 for illegal directory traversals
341
- - Rack::File now returns 405 for illegal methods (non HEAD/GET)
342
- - Rack::Cascade now catches 405 by default, as well as 404
343
- - Cookies missing '--' no longer cause an exception to be raised
344
- - Various style changes and documentation spelling errors
345
- - Rack::BodyProxy always ensures to execute its block
346
- - Additional test coverage around cookies and secrets
347
- - Rack::Session::Cookie can now be supplied either secret or old_secret
348
- - Tests are no longer dependent on set order
349
- - Rack::Static no longer defaults to serving index files
350
- - Rack.release was fixed
351
-
352
- ## [1.4.0] 2011-12-28
353
- - Ruby 1.8.6 support has officially been dropped. Not all tests pass.
354
- - Raise sane error messages for broken config.ru
355
- - Allow combining run and map in a config.ru
356
- - Rack::ContentType will not set Content-Type for responses without a body
357
- - Status code 205 does not send a response body
358
- - Rack::Response::Helpers will not rely on instance variables
359
- - Rack::Utils.build_query no longer outputs '=' for nil query values
360
- - Various mime types added
361
- - Rack::MockRequest now supports HEAD
362
- - Rack::Directory now supports files that contain RFC3986 reserved chars
363
- - Rack::File now only supports GET and HEAD requests
364
- - Rack::Server#start now passes the block to Rack::Handler::<h>#run
365
- - Rack::Static now supports an index option
366
- - Added the Teapot status code
367
- - rackup now defaults to Thin instead of Mongrel (if installed)
368
- - Support added for HTTP_X_FORWARDED_SCHEME
369
- - Numerous bug fixes, including many fixes for new and alternate rubies
370
-
371
- ## [1.1.3] 2011-12-28
372
- - Security fix. http://www.ocert.org/advisories/ocert-2011-003.html
373
- Further information here: http://jruby.org/2011/12/27/jruby-1-6-5-1
374
-
375
- ## [1.3.5] 2011-10-17
376
- - Fix annoying warnings caused by the backport in 1.3.4
377
-
378
- ## [1.3.4] 2011-10-01
379
- - Backport security fix from 1.9.3, also fixes some roundtrip issues in URI
380
- - Small documentation update
381
- - Fix an issue where BodyProxy could cause an infinite recursion
382
- - Add some supporting files for travis-ci
383
-
384
- ## [1.2.4] 2011-09-16
385
- - Fix a bug with MRI regex engine to prevent XSS by malformed unicode
386
-
387
- ## [1.3.3] 2011-09-16
388
- - Fix bug with broken query parameters in Rack::ShowExceptions
389
- - Rack::Request#cookies no longer swallows exceptions on broken input
390
- - Prevents XSS attacks enabled by bug in Ruby 1.8's regexp engine
391
- - Rack::ConditionalGet handles broken If-Modified-Since helpers
392
-
393
- ## [1.3.2] 2011-07-16
394
- - Fix for Rails and rack-test, Rack::Utils#escape calls to_s
395
-
396
- ## [1.3.1] 2011-07-13
397
- - Fix 1.9.1 support
398
- - Fix JRuby support
399
- - Properly handle $KCODE in Rack::Utils.escape
400
- - Make method_missing/respond_to behavior consistent for Rack::Lock,
401
- Rack::Auth::Digest::Request and Rack::Multipart::UploadedFile
402
- - Reenable passing rack.session to session middleware
403
- - Rack::CommonLogger handles streaming responses correctly
404
- - Rack::MockResponse calls close on the body object
405
- - Fix a DOS vector from MRI stdlib backport
406
-
407
- ## [1.2.3] 2011-05-22
408
- - Pulled in relevant bug fixes from 1.3
409
- - Fixed 1.8.6 support
410
-
411
- ## [1.3.0] 2011-05-22
412
- - Various performance optimizations
413
- - Various multipart fixes
414
- - Various multipart refactors
415
- - Infinite loop fix for multipart
416
- - Test coverage for Rack::Server returns
417
- - Allow files with '..', but not path components that are '..'
418
- - rackup accepts handler-specific options on the command line
419
- - Request#params no longer merges POST into GET (but returns the same)
420
- - Use URI.encode_www_form_component instead. Use core methods for escaping.
421
- - Allow multi-line comments in the config file
422
- - Bug L#94 reported by Nikolai Lugovoi, query parameter unescaping.
423
- - Rack::Response now deletes Content-Length when appropriate
424
- - Rack::Deflater now supports streaming
425
- - Improved Rack::Handler loading and searching
426
- - Support for the PATCH verb
427
- - env['rack.session.options'] now contains session options
428
- - Cookies respect renew
429
- - Session middleware uses SecureRandom.hex
430
-
431
- ## [1.2.2, 1.1.2] 2011-03-13
432
- - Security fix in Rack::Auth::Digest::MD5: when authenticator
433
- returned nil, permission was granted on empty password.
434
-
435
- ## [1.2.1] 2010-06-15
436
- - Make CGI handler rewindable
437
- - Rename spec/ to test/ to not conflict with SPEC on lesser
438
- operating systems
439
-
440
- ## [1.2.0] 2010-06-13
441
- - Removed Camping adapter: Camping 2.0 supports Rack as-is
442
- - Removed parsing of quoted values
443
- - Add Request.trace? and Request.options?
444
- - Add mime-type for .webm and .htc
445
- - Fix HTTP_X_FORWARDED_FOR
446
- - Various multipart fixes
447
- - Switch test suite to bacon
448
-
449
- ## [1.1.0] 2010-01-03
450
- - Moved Auth::OpenID to rack-contrib.
451
- - SPEC change that relaxes Lint slightly to allow subclasses of the
452
- required types
453
- - SPEC change to document rack.input binary mode in greator detail
454
- - SPEC define optional rack.logger specification
455
- - File servers support X-Cascade header
456
- - Imported Config middleware
457
- - Imported ETag middleware
458
- - Imported Runtime middleware
459
- - Imported Sendfile middleware
460
- - New Logger and NullLogger middlewares
461
- - Added mime type for .ogv and .manifest.
462
- - Don't squeeze PATH_INFO slashes
463
- - Use Content-Type to determine POST params parsing
464
- - Update Rack::Utils::HTTP_STATUS_CODES hash
465
- - Add status code lookup utility
466
- - Response should call #to_i on the status
467
- - Add Request#user_agent
468
- - Request#host knows about forwared host
469
- - Return an empty string for Request#host if HTTP_HOST and
470
- SERVER_NAME are both missing
471
- - Allow MockRequest to accept hash params
472
- - Optimizations to HeaderHash
473
- - Refactored rackup into Rack::Server
474
- - Added Utils.build_nested_query to complement Utils.parse_nested_query
475
- - Added Utils::Multipart.build_multipart to complement
476
- Utils::Multipart.parse_multipart
477
- - Extracted set and delete cookie helpers into Utils so they can be
478
- used outside Response
479
- - Extract parse_query and parse_multipart in Request so subclasses
480
- can change their behavior
481
- - Enforce binary encoding in RewindableInput
482
- - Set correct external_encoding for handlers that don't use RewindableInput
483
-
484
- ## [1.0.1] 2009-10-18
485
- - Bump remainder of rack.versions.
486
- - Support the pure Ruby FCGI implementation.
487
- - Fix for form names containing "=": split first then unescape components
488
- - Fixes the handling of the filename parameter with semicolons in names.
489
- - Add anchor to nested params parsing regexp to prevent stack overflows
490
- - Use more compatible gzip write api instead of "<<".
491
- - Make sure that Reloader doesn't break when executed via ruby -e
492
- - Make sure WEBrick respects the :Host option
493
- - Many Ruby 1.9 fixes.
494
-
495
- ## [1.0.0] 2009-04-25
496
- - SPEC change: Rack::VERSION has been pushed to [1,0].
497
- - SPEC change: header values must be Strings now, split on "\n".
498
- - SPEC change: Content-Length can be missing, in this case chunked transfer
499
- encoding is used.
500
- - SPEC change: rack.input must be rewindable and support reading into
501
- a buffer, wrap with Rack::RewindableInput if it isn't.
502
- - SPEC change: rack.session is now specified.
503
- - SPEC change: Bodies can now additionally respond to #to_path with
504
- a filename to be served.
505
- - NOTE: String bodies break in 1.9, use an Array consisting of a
506
- single String instead.
507
- - New middleware Rack::Lock.
508
- - New middleware Rack::ContentType.
509
- - Rack::Reloader has been rewritten.
510
- - Major update to Rack::Auth::OpenID.
511
- - Support for nested parameter parsing in Rack::Response.
512
- - Support for redirects in Rack::Response.
513
- - HttpOnly cookie support in Rack::Response.
514
- - The Rakefile has been rewritten.
515
- - Many bugfixes and small improvements.
516
-
517
- ## [0.9.1] 2009-01-09
518
- - Fix directory traversal exploits in Rack::File and Rack::Directory.
519
-
520
- ## [0.9] 2009-01-06
521
- - Rack is now managed by the Rack Core Team.
522
- - Rack::Lint is stricter and follows the HTTP RFCs more closely.
523
- - Added ConditionalGet middleware.
524
- - Added ContentLength middleware.
525
- - Added Deflater middleware.
526
- - Added Head middleware.
527
- - Added MethodOverride middleware.
528
- - Rack::Mime now provides popular MIME-types and their extension.
529
- - Mongrel Header now streams.
530
- - Added Thin handler.
531
- - Official support for swiftiplied Mongrel.
532
- - Secure cookies.
533
- - Made HeaderHash case-preserving.
534
- - Many bugfixes and small improvements.
535
-
536
- ## [0.4] 2008-08-21
537
- - New middleware, Rack::Deflater, by Christoffer Sawicki.
538
- - OpenID authentication now needs ruby-openid 2.
539
- - New Memcache sessions, by blink.
540
- - Explicit EventedMongrel handler, by Joshua Peek <josh@joshpeek.com>
541
- - Rack::Reloader is not loaded in rackup development mode.
542
- - rackup can daemonize with -D.
543
- - Many bugfixes, especially for pool sessions, URLMap, thread safety
544
- and tempfile handling.
545
- - Improved tests.
546
- - Rack moved to Git.
547
-
548
- ## [0.3] 2008-02-26
549
- - LiteSpeed handler, by Adrian Madrid.
550
- - SCGI handler, by Jeremy Evans.
551
- - Pool sessions, by blink.
552
- - OpenID authentication, by blink.
553
- - :Port and :File options for opening FastCGI sockets, by blink.
554
- - Last-Modified HTTP header for Rack::File, by blink.
555
- - Rack::Builder#use now accepts blocks, by Corey Jewett.
556
- (See example/protectedlobster.ru)
557
- - HTTP status 201 can contain a Content-Type and a body now.
558
- - Many bugfixes, especially related to Cookie handling.
559
-
560
- ## [0.2] 2007-05-16
561
- - HTTP Basic authentication.
562
- - Cookie Sessions.
563
- - Static file handler.
564
- - Improved Rack::Request.
565
- - Improved Rack::Response.
566
- - Added Rack::ShowStatus, for better default error messages.
567
- - Bug fixes in the Camping adapter.
568
- - Removed Rails adapter, was too alpha.
569
-
570
- ## [0.1] 2007-03-03
60
+ - CHANGELOG updates. ([@drenmi](https://github.com/Drenmi), [@p8](https://github.com/p8))
@@ -20,7 +20,7 @@ module Rack
20
20
  VERSION.join(".")
21
21
  end
22
22
 
23
- RELEASE = "2.1.0"
23
+ RELEASE = "2.1.1"
24
24
 
25
25
  # Return the Rack release as a dotted string.
26
26
  def self.release
@@ -3,6 +3,5 @@
3
3
  require 'rack/files'
4
4
 
5
5
  module Rack
6
- warn "Rack::File is deprecated, please use Rack::Files instead."
7
6
  File = Files
8
7
  end
@@ -22,7 +22,7 @@ module Rack
22
22
  attr_reader :root
23
23
 
24
24
  def initialize(root, headers = {}, default_mime = 'text/plain')
25
- @root = ::File.expand_path root
25
+ @root = (::File.expand_path(root) if root)
26
26
  @headers = headers
27
27
  @default_mime = default_mime
28
28
  @head = Rack::Head.new(lambda { |env| get env })
@@ -262,13 +262,11 @@ module Rack
262
262
  m = Hash.new {|h, k| h[k] = []}
263
263
  m["deployment"] = [
264
264
  [Rack::ContentLength],
265
- [Rack::Chunked],
266
265
  logging_middleware,
267
266
  [Rack::TempfileReaper]
268
267
  ]
269
268
  m["development"] = [
270
269
  [Rack::ContentLength],
271
- [Rack::Chunked],
272
270
  logging_middleware,
273
271
  [Rack::ShowExceptions],
274
272
  [Rack::Lint],
@@ -28,9 +28,9 @@ module Rack
28
28
  end
29
29
 
30
30
  alias :cookie_value :public_id
31
+ alias :to_s :public_id
31
32
 
32
33
  def empty?; false; end
33
- def to_s; raise; end
34
34
  def inspect; public_id.inspect; end
35
35
 
36
36
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leah Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2020-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.1.1
188
+ rubygems_version: 3.0.3
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: a modular Ruby webserver interface