rack 1.0.1 → 2.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +829 -0
  3. data/CONTRIBUTING.md +136 -0
  4. data/{COPYING → MIT-LICENSE} +4 -2
  5. data/README.rdoc +355 -0
  6. data/Rakefile +64 -98
  7. data/SPEC.rdoc +292 -0
  8. data/bin/rackup +3 -174
  9. data/contrib/rack.png +0 -0
  10. data/contrib/rack.svg +150 -0
  11. data/contrib/rack_logo.svg +164 -111
  12. data/contrib/rdoc.css +412 -0
  13. data/example/lobster.ru +2 -0
  14. data/example/protectedlobster.rb +4 -2
  15. data/example/protectedlobster.ru +3 -1
  16. data/lib/rack/auth/abstract/handler.rb +7 -5
  17. data/lib/rack/auth/abstract/request.rb +12 -2
  18. data/lib/rack/auth/basic.rb +6 -4
  19. data/lib/rack/auth/digest/md5.rb +20 -13
  20. data/lib/rack/auth/digest/nonce.rb +6 -4
  21. data/lib/rack/auth/digest/params.rb +11 -12
  22. data/lib/rack/auth/digest/request.rb +15 -12
  23. data/lib/rack/body_proxy.rb +45 -0
  24. data/lib/rack/builder.rb +213 -19
  25. data/lib/rack/cascade.rb +50 -18
  26. data/lib/rack/chunked.rb +95 -27
  27. data/lib/rack/common_logger.rb +84 -0
  28. data/lib/rack/conditional_get.rb +83 -0
  29. data/lib/rack/config.rb +22 -0
  30. data/lib/rack/content_length.rb +19 -10
  31. data/lib/rack/content_type.rb +12 -5
  32. data/lib/rack/core_ext/regexp.rb +14 -0
  33. data/lib/rack/deflater.rb +90 -42
  34. data/lib/rack/directory.rb +118 -72
  35. data/lib/rack/etag.rb +77 -0
  36. data/lib/rack/events.rb +153 -0
  37. data/lib/rack/file.rb +4 -85
  38. data/lib/rack/files.rb +218 -0
  39. data/lib/rack/handler/cgi.rb +22 -24
  40. data/lib/rack/handler/fastcgi.rb +34 -24
  41. data/lib/rack/handler/lsws.rb +16 -15
  42. data/lib/rack/handler/scgi.rb +38 -29
  43. data/lib/rack/handler/thin.rb +23 -7
  44. data/lib/rack/handler/webrick.rb +95 -37
  45. data/lib/rack/handler.rb +49 -14
  46. data/lib/rack/head.rb +19 -13
  47. data/lib/rack/lint.rb +466 -217
  48. data/lib/rack/lobster.rb +19 -14
  49. data/lib/rack/lock.rb +24 -8
  50. data/lib/rack/logger.rb +20 -0
  51. data/lib/rack/media_type.rb +53 -0
  52. data/lib/rack/method_override.rb +52 -0
  53. data/lib/rack/mime.rb +652 -171
  54. data/lib/rack/mock.rb +203 -64
  55. data/lib/rack/multipart/generator.rb +97 -0
  56. data/lib/rack/multipart/parser.rb +440 -0
  57. data/lib/rack/multipart/uploaded_file.rb +41 -0
  58. data/lib/rack/multipart.rb +64 -0
  59. data/lib/rack/null_logger.rb +39 -0
  60. data/lib/rack/query_parser.rb +266 -0
  61. data/lib/rack/recursive.rb +18 -11
  62. data/lib/rack/reloader.rb +13 -5
  63. data/lib/rack/request.rb +607 -191
  64. data/lib/rack/response.rb +245 -110
  65. data/lib/rack/rewindable_input.rb +15 -21
  66. data/lib/rack/runtime.rb +34 -0
  67. data/lib/rack/sendfile.rb +192 -0
  68. data/lib/rack/server.rb +466 -0
  69. data/lib/rack/session/abstract/id.rb +449 -68
  70. data/lib/rack/session/cookie.rb +159 -47
  71. data/lib/rack/session/memcache.rb +4 -103
  72. data/lib/rack/session/pool.rb +39 -49
  73. data/lib/rack/show_exceptions.rb +390 -0
  74. data/lib/rack/{showstatus.rb → show_status.rb} +21 -14
  75. data/lib/rack/static.rb +164 -14
  76. data/lib/rack/tempfile_reaper.rb +22 -0
  77. data/lib/rack/urlmap.rb +60 -18
  78. data/lib/rack/utils.rb +508 -277
  79. data/lib/rack/version.rb +29 -0
  80. data/lib/rack.rb +85 -34
  81. data/rack.gemspec +43 -51
  82. metadata +119 -207
  83. data/KNOWN-ISSUES +0 -18
  84. data/RDOX +0 -428
  85. data/README +0 -364
  86. data/SPEC +0 -164
  87. data/lib/rack/adapter/camping.rb +0 -22
  88. data/lib/rack/auth/openid.rb +0 -480
  89. data/lib/rack/commonlogger.rb +0 -61
  90. data/lib/rack/conditionalget.rb +0 -47
  91. data/lib/rack/handler/evented_mongrel.rb +0 -8
  92. data/lib/rack/handler/mongrel.rb +0 -87
  93. data/lib/rack/handler/swiftiplied_mongrel.rb +0 -8
  94. data/lib/rack/methodoverride.rb +0 -27
  95. data/lib/rack/showexceptions.rb +0 -349
  96. data/test/cgi/lighttpd.conf +0 -20
  97. data/test/cgi/test +0 -9
  98. data/test/cgi/test.fcgi +0 -8
  99. data/test/cgi/test.ru +0 -7
  100. data/test/multipart/binary +0 -0
  101. data/test/multipart/empty +0 -10
  102. data/test/multipart/ie +0 -6
  103. data/test/multipart/nested +0 -10
  104. data/test/multipart/none +0 -9
  105. data/test/multipart/semicolon +0 -6
  106. data/test/multipart/text +0 -10
  107. data/test/spec_rack_auth_basic.rb +0 -73
  108. data/test/spec_rack_auth_digest.rb +0 -226
  109. data/test/spec_rack_auth_openid.rb +0 -84
  110. data/test/spec_rack_builder.rb +0 -84
  111. data/test/spec_rack_camping.rb +0 -51
  112. data/test/spec_rack_cascade.rb +0 -50
  113. data/test/spec_rack_cgi.rb +0 -89
  114. data/test/spec_rack_chunked.rb +0 -62
  115. data/test/spec_rack_commonlogger.rb +0 -32
  116. data/test/spec_rack_conditionalget.rb +0 -41
  117. data/test/spec_rack_content_length.rb +0 -43
  118. data/test/spec_rack_content_type.rb +0 -30
  119. data/test/spec_rack_deflater.rb +0 -127
  120. data/test/spec_rack_directory.rb +0 -61
  121. data/test/spec_rack_fastcgi.rb +0 -89
  122. data/test/spec_rack_file.rb +0 -75
  123. data/test/spec_rack_handler.rb +0 -43
  124. data/test/spec_rack_head.rb +0 -30
  125. data/test/spec_rack_lint.rb +0 -521
  126. data/test/spec_rack_lobster.rb +0 -45
  127. data/test/spec_rack_lock.rb +0 -38
  128. data/test/spec_rack_methodoverride.rb +0 -60
  129. data/test/spec_rack_mock.rb +0 -157
  130. data/test/spec_rack_mongrel.rb +0 -189
  131. data/test/spec_rack_recursive.rb +0 -77
  132. data/test/spec_rack_request.rb +0 -504
  133. data/test/spec_rack_response.rb +0 -218
  134. data/test/spec_rack_rewindable_input.rb +0 -118
  135. data/test/spec_rack_session_cookie.rb +0 -82
  136. data/test/spec_rack_session_memcache.rb +0 -240
  137. data/test/spec_rack_session_pool.rb +0 -172
  138. data/test/spec_rack_showexceptions.rb +0 -21
  139. data/test/spec_rack_showstatus.rb +0 -72
  140. data/test/spec_rack_static.rb +0 -37
  141. data/test/spec_rack_thin.rb +0 -91
  142. data/test/spec_rack_urlmap.rb +0 -185
  143. data/test/spec_rack_utils.rb +0 -387
  144. data/test/spec_rack_webrick.rb +0 -130
  145. data/test/testrequest.rb +0 -57
  146. data/test/unregistered_handler/rack/handler/unregistered.rb +0 -7
  147. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -7
data/CHANGELOG.md ADDED
@@ -0,0 +1,829 @@
1
+ # Changelog
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/).
4
+
5
+ ## [2.2.21] - 2025-11-03
6
+
7
+ ### Fixed
8
+
9
+ - Multipart parser: limit MIME header size check to the unread buffer region to avoid false `multipart mime part header too large` errors when previously read data accumulates in the scan buffer. ([#2392](https://github.com/rack/rack/pull/2392), [@alpaca-tc](https://github.com/alpaca-tc), [@willnet](https://github.com/willnet), [@krororo](https://github.com/krororo))
10
+
11
+ ## [2.2.20] - 2025-10-10
12
+
13
+ ### Security
14
+
15
+ - [CVE-2025-61780](https://github.com/advisories/GHSA-r657-rxjc-j557) Improper handling of headers in `Rack::Sendfile` may allow proxy bypass.
16
+ - [CVE-2025-61919](https://github.com/advisories/GHSA-6xw4-3v39-52mm) Unbounded read in `Rack::Request` form parsing can lead to memory exhaustion.
17
+
18
+ ## [2.2.20] - 2025-11-03
19
+
20
+ ### Fixed
21
+
22
+ - Multipart parser: limit MIME header size check to the unread buffer region to avoid false `multipart mime part header too large` errors when previously read data accumulates in the scan buffer. ([#2392](https://github.com/rack/rack/pull/2392), [@alpaca-tc](https://github.com/alpaca-tc), [@willnet](https://github.com/willnet), [@krororo](https://github.com/krororo))
23
+
24
+
25
+ ## [2.2.19] - 2025-10-07
26
+
27
+ ### Security
28
+
29
+ - [CVE-2025-61772](https://github.com/advisories/GHSA-wpv5-97wm-hp9c) Multipart parser buffers unbounded per-part headers, enabling DoS (memory exhaustion)
30
+ - [CVE-2025-61771](https://github.com/advisories/GHSA-w9pc-fmgc-vxvw) Multipart parser buffers large non‑file fields entirely in memory, enabling DoS (memory exhaustion)
31
+ - [CVE-2025-61770](https://github.com/advisories/GHSA-p543-xpfm-54cp) Unbounded multipart preamble buffering enables DoS (memory exhaustion)
32
+
33
+ ## [2.2.18] - 2025-09-25
34
+
35
+ ### Security
36
+
37
+ - [CVE-2025-59830](https://github.com/advisories/GHSA-625h-95r8-8xpm) Unbounded parameter parsing in `Rack::QueryParser` can lead to memory exhaustion via semicolon-separated parameters.
38
+
39
+ ## [2.2.17] - 2025-06-03
40
+
41
+ - Backport `Rack::MediaType#params` now handles parameters without values. ([#2263](https://github.com/rack/rack/pull/2263), [@AllyMarthaJ](https://github.com/AllyMarthaJ))
42
+
43
+ ## [2.2.16] - 2025-05-22
44
+
45
+ - Fix incorrect backport of optional `CGI::Cookie` support. ([#2335](https://github.com/rack/rack/pull/2335), [@jeremyevans])
46
+
47
+ ## [2.2.15] - 2025-05-18
48
+
49
+ - Optional support for `CGI::Cookie` if not available. ([#2327](https://github.com/rack/rack/pull/2327), [#2333](https://github.com/rack/rack/pull/2333), [@earlopain])
50
+
51
+ ## [2.2.14] - 2025-05-06
52
+
53
+ ### Security
54
+
55
+ - [CVE-2025-32441](https://github.com/advisories/GHSA-vpfw-47h7-xj4g) Rack session can be restored after deletion.
56
+ - [CVE-2025-46727](https://github.com/advisories/GHSA-gjh7-p2fx-99vx) Unbounded parameter parsing in `Rack::QueryParser` can lead to memory exhaustion.
57
+
58
+ ## [2.2.13] - 2025-03-11
59
+
60
+ ### Security
61
+
62
+ - [CVE-2025-27610](https://github.com/advisories/GHSA-7wqh-767x-r66v) Local file inclusion in `Rack::Static`.
63
+
64
+ ## [2.2.12] - 2025-03-04
65
+
66
+ ### Security
67
+
68
+ - [CVE-2025-27111](https://github.com/advisories/GHSA-8cgq-6mh2-7j6v) Possible Log Injection in `Rack::Sendfile`.
69
+
70
+ ## [2.2.11] - 2025-02-12
71
+
72
+ ### Security
73
+
74
+ - [CVE-2025-25184](https://github.com/advisories/GHSA-7g2v-jj9q-g3rg) Possible Log Injection in `Rack::CommonLogger`.
75
+
76
+ ## [2.2.10] - 2024-10-14
77
+
78
+ - Fix compatibility issues with Ruby v3.4.0. ([#2248](https://github.com/rack/rack/pull/2248), [@byroot](https://github.com/byroot))
79
+
80
+ ## [2.2.9] - 2023-03-21
81
+
82
+ - Return empty when parsing a multi-part POST with only one end delimiter. ([#2104](https://github.com/rack/rack/pull/2104), [@alpaca-tc])
83
+
84
+ ## [2.2.8] - 2023-07-31
85
+
86
+ - Regenerate SPEC ([#2102](https://github.com/rack/rack/pull/2102), [@skipkayhil](https://github.com/skipkayhil))
87
+ - Limit file extension length of multipart tempfiles ([#2015](https://github.com/rack/rack/pull/2015), [@dentarg](https://github.com/dentarg))
88
+ - Fix "undefined method DelegateClass for Rack::Session::Cookie:Class" ([#2092](https://github.com/rack/rack/pull/2092), [@onigra](https://github.com/onigra) [@dchandekstark](https://github.com/dchandekstark))
89
+
90
+ ## [2.2.7] - 2023-03-13
91
+
92
+ - Correct the year number in the changelog ([#2015](https://github.com/rack/rack/pull/2015), [@kimulab](https://github.com/kimulab))
93
+ - Support underscore in host names for Rack 2.2 (Fixes [#2070](https://github.com/rack/rack/issues/2070)) ([#2015](https://github.com/rack/rack/pull/2071), [@jeremyevans](https://github.com/jeremyevans))
94
+
95
+ ## [2.2.6.4] - 2023-03-13
96
+
97
+ - [CVE-2023-27539] Avoid ReDoS in header parsing
98
+
99
+ ## [2.2.6.3] - 2023-03-02
100
+
101
+ - [CVE-2023-27530] Introduce multipart_total_part_limit to limit total parts
102
+
103
+ ## [2.2.6.2] - 2023-01-17
104
+
105
+ - [CVE-2022-44570] Fix ReDoS in Rack::Utils.get_byte_ranges
106
+
107
+ ## [2.2.6.1] - 2023-01-17
108
+
109
+ - [CVE-2022-44571] Fix ReDoS vulnerability in multipart parser
110
+ - [CVE-2022-44572] Forbid control characters in attributes (also ReDoS)
111
+
112
+ ## [2.2.6] - 2023-01-17
113
+
114
+ - Extend `Rack::MethodOverride` to handle `QueryParser::ParamsTooDeepError` error. ([#2011](https://github.com/rack/rack/pull/2011), [@byroot](https://github.com/byroot))
115
+
116
+ ## [2.2.5] - 2022-12-27
117
+
118
+ ### Fixed
119
+
120
+ - `Rack::URLMap` uses non-deprecated form of `Regexp.new`. ([#1998](https://github.com/rack/rack/pull/1998), [@weizheheng](https://github.com/weizheheng))
121
+
122
+ ## [2.2.4] - 2022-06-30
123
+
124
+ - Better support for lower case headers in `Rack::ETag` middleware. ([#1919](https://github.com/rack/rack/pull/1919), [@ioquatix](https://github.com/ioquatix))
125
+ - Use custom exception on params too deep error. ([#1838](https://github.com/rack/rack/pull/1838), [@simi](https://github.com/simi))
126
+
127
+ ## [2.2.3.1] - 2022-05-27
128
+
129
+ ### Security
130
+
131
+ - [CVE-2022-30123] Fix shell escaping issue in Common Logger
132
+ - [CVE-2022-30122] Restrict parsing of broken MIME attachments
133
+
134
+ ## [2.2.3] - 2020-02-11
135
+
136
+ ### Security
137
+
138
+ - [CVE-2020-8184] Only decode cookie values
139
+
140
+ ## [2.2.2] - 2020-02-11
141
+
142
+ ### Fixed
143
+
144
+ - Fix incorrect `Rack::Request#host` value. ([#1591](https://github.com/rack/rack/pull/1591), [@ioquatix](https://github.com/ioquatix))
145
+ - Revert `Rack::Handler::Thin` implementation. ([#1583](https://github.com/rack/rack/pull/1583), [@jeremyevans](https://github.com/jeremyevans))
146
+ - Double assignment is still needed to prevent an "unused variable" warning. ([#1589](https://github.com/rack/rack/pull/1589), [@kamipo](https://github.com/kamipo))
147
+ - Fix to handle same_site option for session pool. ([#1587](https://github.com/rack/rack/pull/1587), [@kamipo](https://github.com/kamipo))
148
+
149
+ ## [2.2.1] - 2020-02-09
150
+
151
+ ### Fixed
152
+
153
+ - Rework `Rack::Request#ip` to handle empty `forwarded_for`. ([#1577](https://github.com/rack/rack/pull/1577), [@ioquatix](https://github.com/ioquatix))
154
+
155
+ ## [2.2.0] - 2020-02-08
156
+
157
+ ### SPEC Changes
158
+
159
+ - `rack.session` request environment entry must respond to `to_hash` and return unfrozen Hash. ([@jeremyevans](https://github.com/jeremyevans))
160
+ - Request environment cannot be frozen. ([@jeremyevans](https://github.com/jeremyevans))
161
+ - CGI values in the request environment with non-ASCII characters must use ASCII-8BIT encoding. ([@jeremyevans](https://github.com/jeremyevans))
162
+ - Improve SPEC/lint relating to SERVER_NAME, SERVER_PORT and HTTP_HOST. ([#1561](https://github.com/rack/rack/pull/1561), [@ioquatix](https://github.com/ioquatix))
163
+
164
+ ### Added
165
+
166
+ - `rackup` supports multiple `-r` options and will require all arguments. ([@jeremyevans](https://github.com/jeremyevans))
167
+ - `Server` supports an array of paths to require for the `:require` option. ([@khotta](https://github.com/khotta))
168
+ - `Files` supports multipart range requests. ([@fatkodima](https://github.com/fatkodima))
169
+ - `Multipart::UploadedFile` supports an IO-like object instead of using the filesystem, using `:filename` and `:io` options. ([@jeremyevans](https://github.com/jeremyevans))
170
+ - `Multipart::UploadedFile` supports keyword arguments `:path`, `:content_type`, and `:binary` in addition to positional arguments. ([@jeremyevans](https://github.com/jeremyevans))
171
+ - `Static` supports a `:cascade` option for calling the app if there is no matching file. ([@jeremyevans](https://github.com/jeremyevans))
172
+ - `Session::Abstract::SessionHash#dig`. ([@jeremyevans](https://github.com/jeremyevans))
173
+ - `Response.[]` and `MockResponse.[]` for creating instances using status, headers, and body. ([@ioquatix](https://github.com/ioquatix))
174
+ - Convenient cache and content type methods for `Rack::Response`. ([#1555](https://github.com/rack/rack/pull/1555), [@ioquatix](https://github.com/ioquatix))
175
+
176
+ ### Changed
177
+
178
+ - `Request#params` no longer rescues EOFError. ([@jeremyevans](https://github.com/jeremyevans))
179
+ - `Directory` uses a streaming approach, significantly improving time to first byte for large directories. ([@jeremyevans](https://github.com/jeremyevans))
180
+ - `Directory` no longer includes a Parent directory link in the root directory index. ([@jeremyevans](https://github.com/jeremyevans))
181
+ - `QueryParser#parse_nested_query` uses original backtrace when reraising exception with new class. ([@jeremyevans](https://github.com/jeremyevans))
182
+ - `ConditionalGet` follows RFC 7232 precedence if both If-None-Match and If-Modified-Since headers are provided. ([@jeremyevans](https://github.com/jeremyevans))
183
+ - `.ru` files supports the `frozen-string-literal` magic comment. ([@eregon](https://github.com/eregon))
184
+ - Rely on autoload to load constants instead of requiring internal files, make sure to require 'rack' and not just 'rack/...'. ([@jeremyevans](https://github.com/jeremyevans))
185
+ - `Etag` will continue sending ETag even if the response should not be cached. ([@henm](https://github.com/henm))
186
+ - `Request#host_with_port` no longer includes a colon for a missing or empty port. ([@AlexWayfer](https://github.com/AlexWayfer))
187
+ - All handlers uses keywords arguments instead of an options hash argument. ([@ioquatix](https://github.com/ioquatix))
188
+ - `Files` handling of range requests no longer return a body that supports `to_path`, to ensure range requests are handled correctly. ([@jeremyevans](https://github.com/jeremyevans))
189
+ - `Multipart::Generator` only includes `Content-Length` for files with paths, and `Content-Disposition` `filename` if the `UploadedFile` instance has one. ([@jeremyevans](https://github.com/jeremyevans))
190
+ - `Request#ssl?` is true for the `wss` scheme (secure websockets). ([@jeremyevans](https://github.com/jeremyevans))
191
+ - `Rack::HeaderHash` is memoized by default. ([#1549](https://github.com/rack/rack/pull/1549), [@ioquatix](https://github.com/ioquatix))
192
+ - `Rack::Directory` allow directory traversal inside root directory. ([#1417](https://github.com/rack/rack/pull/1417), [@ThomasSevestre](https://github.com/ThomasSevestre))
193
+ - Sort encodings by server preference. ([#1184](https://github.com/rack/rack/pull/1184), [@ioquatix](https://github.com/ioquatix), [@wjordan](https://github.com/wjordan))
194
+ - Rework host/hostname/authority implementation in `Rack::Request`. `#host` and `#host_with_port` have been changed to correctly return IPv6 addresses formatted with square brackets, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-3.2.2). ([#1561](https://github.com/rack/rack/pull/1561), [@ioquatix](https://github.com/ioquatix))
195
+ - `Rack::Builder` parsing options on first `#\` line is deprecated. ([#1574](https://github.com/rack/rack/pull/1574), [@ioquatix](https://github.com/ioquatix))
196
+
197
+ ### Removed
198
+
199
+ - `Directory#path` as it was not used and always returned nil. ([@jeremyevans](https://github.com/jeremyevans))
200
+ - `BodyProxy#each` as it was only needed to work around a bug in Ruby <1.9.3. ([@jeremyevans](https://github.com/jeremyevans))
201
+ - `URLMap::INFINITY` and `URLMap::NEGATIVE_INFINITY`, in favor of `Float::INFINITY`. ([@ch1c0t](https://github.com/ch1c0t))
202
+ - Deprecation of `Rack::File`. It will be deprecated again in rack 2.2 or 3.0. ([@rafaelfranca](https://github.com/rafaelfranca))
203
+ - Support for Ruby 2.2 as it is well past EOL. ([@ioquatix](https://github.com/ioquatix))
204
+ - Remove `Rack::Files#response_body` as the implementation was broken. ([#1153](https://github.com/rack/rack/pull/1153), [@ioquatix](https://github.com/ioquatix))
205
+ - Remove `SERVER_ADDR` which was never part of the original SPEC. ([#1573](https://github.com/rack/rack/pull/1573), [@ioquatix](https://github.com/ioquatix))
206
+
207
+ ### Fixed
208
+
209
+ - `Directory` correctly handles root paths containing glob metacharacters. ([@jeremyevans](https://github.com/jeremyevans))
210
+ - `Cascade` uses a new response object for each call if initialized with no apps. ([@jeremyevans](https://github.com/jeremyevans))
211
+ - `BodyProxy` correctly delegates keyword arguments to the body object on Ruby 2.7+. ([@jeremyevans](https://github.com/jeremyevans))
212
+ - `BodyProxy#method` correctly handles methods delegated to the body object. ([@jeremyevans](https://github.com/jeremyevans))
213
+ - `Request#host` and `Request#host_with_port` handle IPv6 addresses correctly. ([@AlexWayfer](https://github.com/AlexWayfer))
214
+ - `Lint` checks when response hijacking that `rack.hijack` is called with a valid object. ([@jeremyevans](https://github.com/jeremyevans))
215
+ - `Response#write` correctly updates `Content-Length` if initialized with a body. ([@jeremyevans](https://github.com/jeremyevans))
216
+ - `CommonLogger` includes `SCRIPT_NAME` when logging. ([@Erol](https://github.com/Erol))
217
+ - `Utils.parse_nested_query` correctly handles empty queries, using an empty instance of the params class instead of a hash. ([@jeremyevans](https://github.com/jeremyevans))
218
+ - `Directory` correctly escapes paths in links. ([@yous](https://github.com/yous))
219
+ - `Request#delete_cookie` and related `Utils` methods handle `:domain` and `:path` options in same call. ([@jeremyevans](https://github.com/jeremyevans))
220
+ - `Request#delete_cookie` and related `Utils` methods do an exact match on `:domain` and `:path` options. ([@jeremyevans](https://github.com/jeremyevans))
221
+ - `Static` no longer adds headers when a gzipped file request has a 304 response. ([@chooh](https://github.com/chooh))
222
+ - `ContentLength` sets `Content-Length` response header even for bodies not responding to `to_ary`. ([@jeremyevans](https://github.com/jeremyevans))
223
+ - Thin handler supports options passed directly to `Thin::Controllers::Controller`. ([@jeremyevans](https://github.com/jeremyevans))
224
+ - WEBrick handler no longer ignores `:BindAddress` option. ([@jeremyevans](https://github.com/jeremyevans))
225
+ - `ShowExceptions` handles invalid POST data. ([@jeremyevans](https://github.com/jeremyevans))
226
+ - Basic authentication requires a password, even if the password is empty. ([@jeremyevans](https://github.com/jeremyevans))
227
+ - `Lint` checks response is array with 3 elements, per SPEC. ([@jeremyevans](https://github.com/jeremyevans))
228
+ - Support for using `:SSLEnable` option when using WEBrick handler. (Gregor Melhorn)
229
+ - Close response body after buffering it when buffering. ([@ioquatix](https://github.com/ioquatix))
230
+ - Only accept `;` as delimiter when parsing cookies. ([@mrageh](https://github.com/mrageh))
231
+ - `Utils::HeaderHash#clear` clears the name mapping as well. ([@raxoft](https://github.com/raxoft))
232
+ - Support for passing `nil` `Rack::Files.new`, which notably fixes Rails' current `ActiveStorage::FileServer` implementation. ([@ioquatix](https://github.com/ioquatix))
233
+
234
+ ### Documentation
235
+
236
+ - CHANGELOG updates. ([@aupajo](https://github.com/aupajo))
237
+ - Added [CONTRIBUTING](CONTRIBUTING.md). ([@dblock](https://github.com/dblock))
238
+
239
+ ## [2.1.2] - 2020-01-27
240
+
241
+ - Fix multipart parser for some files to prevent denial of service ([@aiomaster](https://github.com/aiomaster))
242
+ - Fix `Rack::Builder#use` with keyword arguments ([@kamipo](https://github.com/kamipo))
243
+ - Skip deflating in Rack::Deflater if Content-Length is 0 ([@jeremyevans](https://github.com/jeremyevans))
244
+ - Remove `SessionHash#transform_keys`, no longer needed ([@pavel](https://github.com/pavel))
245
+ - Add to_hash to wrap Hash and Session classes ([@oleh-demyanyuk](https://github.com/oleh-demyanyuk))
246
+ - Handle case where session id key is requested but missing ([@jeremyevans](https://github.com/jeremyevans))
247
+
248
+ ## [2.1.1] - 2020-01-12
249
+
250
+ - Remove `Rack::Chunked` from `Rack::Server` default middleware. ([#1475](https://github.com/rack/rack/pull/1475), [@ioquatix](https://github.com/ioquatix))
251
+ - Restore support for code relying on `SessionId#to_s`. ([@jeremyevans](https://github.com/jeremyevans))
252
+
253
+ ## [2.1.0] - 2020-01-10
254
+
255
+ ### Added
256
+
257
+ - Add support for `SameSite=None` cookie value. ([@hennikul](https://github.com/hennikul))
258
+ - Add trailer headers. ([@eileencodes](https://github.com/eileencodes))
259
+ - Add MIME Types for video streaming. ([@styd](https://github.com/styd))
260
+ - Add MIME Type for WASM. ([@buildrtech](https://github.com/buildrtech))
261
+ - Add `Early Hints(103)` to status codes. ([@egtra](https://github.com/egtra))
262
+ - Add `Too Early(425)` to status codes. ([@y-yagi]((https://github.com/y-yagi)))
263
+ - Add `Bandwidth Limit Exceeded(509)` to status codes. ([@CJKinni](https://github.com/CJKinni))
264
+ - Add method for custom `ip_filter`. ([@svcastaneda](https://github.com/svcastaneda))
265
+ - Add boot-time profiling capabilities to `rackup`. ([@tenderlove](https://github.com/tenderlove))
266
+ - Add multi mapping support for `X-Accel-Mappings` header. ([@yoshuki](https://github.com/yoshuki))
267
+ - Add `sync: false` option to `Rack::Deflater`. (Eric Wong)
268
+ - Add `Builder#freeze_app` to freeze application and all middleware instances. ([@jeremyevans](https://github.com/jeremyevans))
269
+ - Add API to extract cookies from `Rack::MockResponse`. ([@petercline](https://github.com/petercline))
270
+
271
+ ### Changed
272
+
273
+ - Don't propagate nil values from middleware. ([@ioquatix](https://github.com/ioquatix))
274
+ - Lazily initialize the response body and only buffer it if required. ([@ioquatix](https://github.com/ioquatix))
275
+ - Fix deflater zlib buffer errors on empty body part. ([@felixbuenemann](https://github.com/felixbuenemann))
276
+ - Set `X-Accel-Redirect` to percent-encoded path. ([@diskkid](https://github.com/diskkid))
277
+ - Remove unnecessary buffer growing when parsing multipart. ([@tainoe](https://github.com/tainoe))
278
+ - Expand the root path in `Rack::Static` upon initialization. ([@rosenfeld](https://github.com/rosenfeld))
279
+ - Make `ShowExceptions` work with binary data. ([@axyjo](https://github.com/axyjo))
280
+ - Use buffer string when parsing multipart requests. ([@janko-m](https://github.com/janko-m))
281
+ - Support optional UTF-8 Byte Order Mark (BOM) in config.ru. ([@mikegee](https://github.com/mikegee))
282
+ - Handle `X-Forwarded-For` with optional port. ([@dpritchett](https://github.com/dpritchett))
283
+ - Use `Time#httpdate` format for Expires, as proposed by RFC 7231. ([@nanaya](https://github.com/nanaya))
284
+ - Make `Utils.status_code` raise an error when the status symbol is invalid instead of `500`. ([@adambutler](https://github.com/adambutler))
285
+ - Rename `Request::SCHEME_WHITELIST` to `Request::ALLOWED_SCHEMES`.
286
+ - Make `Multipart::Parser.get_filename` accept files with `+` in their name. ([@lucaskanashiro](https://github.com/lucaskanashiro))
287
+ - Add Falcon to the default handler fallbacks. ([@ioquatix](https://github.com/ioquatix))
288
+ - Update codebase to avoid string mutations in preparation for `frozen_string_literals`. ([@pat](https://github.com/pat))
289
+ - Change `MockRequest#env_for` to rely on the input optionally responding to `#size` instead of `#length`. ([@janko](https://github.com/janko))
290
+ - Rename `Rack::File` -> `Rack::Files` and add deprecation notice. ([@postmodern](https://github.com/postmodern)).
291
+ - Prefer Base64 “strict encoding” for Base64 cookies. ([@ioquatix](https://github.com/ioquatix))
292
+
293
+ ### Removed
294
+
295
+ - Remove `to_ary` from Response ([@tenderlove](https://github.com/tenderlove))
296
+ - Deprecate `Rack::Session::Memcache` in favor of `Rack::Session::Dalli` from dalli gem ([@fatkodima](https://github.com/fatkodima))
297
+
298
+ ### Fixed
299
+
300
+ - Eliminate warnings for Ruby 2.7. ([@osamtimizer](https://github.com/osamtimizer]))
301
+
302
+ ### Documentation
303
+
304
+ - Update broken example in `Session::Abstract::ID` documentation. ([tonytonyjan](https://github.com/tonytonyjan))
305
+ - Add Padrino to the list of frameworks implementing Rack. ([@wikimatze](https://github.com/wikimatze))
306
+ - Remove Mongrel from the suggested server options in the help output. ([@tricknotes](https://github.com/tricknotes))
307
+ - Replace `HISTORY.md` and `NEWS.md` with `CHANGELOG.md`. ([@twitnithegirl](https://github.com/twitnithegirl))
308
+ - CHANGELOG updates. ([@drenmi](https://github.com/Drenmi), [@p8](https://github.com/p8))
309
+
310
+ ## [2.0.8] - 2019-12-08
311
+
312
+ ### Security
313
+
314
+ - [[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))
315
+
316
+ ## [1.6.12] - 2019-12-08
317
+
318
+ ### Security
319
+
320
+ - [[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))
321
+
322
+ ## [2.0.7] - 2019-04-02
323
+
324
+ ### Fixed
325
+
326
+ - Remove calls to `#eof?` on Rack input in `Multipart::Parser`, as this breaks the specification. ([@matthewd](https://github.com/matthewd))
327
+ - Preserve forwarded IP addresses for trusted proxy chains. ([@SamSaffron](https://github.com/SamSaffron))
328
+
329
+ ## [2.0.6] - 2018-11-05
330
+
331
+ ### Fixed
332
+
333
+ - [[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))
334
+ - Fix a call to a non-existing method `#accepts_html` in the `ShowExceptions` middleware. ([@tomelm](https://github.com/tomelm))
335
+ - [[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))
336
+
337
+ ## [2.0.5] - 2018-04-23
338
+
339
+ ### Fixed
340
+
341
+ - Record errors originating from invalid UTF8 in `MethodOverride` middleware instead of breaking. ([@mclark](https://github.com/mclark))
342
+
343
+ ## [2.0.4] - 2018-01-31
344
+
345
+ ### Changed
346
+
347
+ - Ensure the `Lock` middleware passes the original `env` object. ([@lugray](https://github.com/lugray))
348
+ - Improve performance of `Multipart::Parser` when uploading large files. ([@tompng](https://github.com/tompng))
349
+ - Increase buffer size in `Multipart::Parser` for better performance. ([@jkowens](https://github.com/jkowens))
350
+ - Reduce memory usage of `Multipart::Parser` when uploading large files. ([@tompng](https://github.com/tompng))
351
+ - Replace ConcurrentRuby dependency with native `Queue`. ([@devmchakan](https://github.com/devmchakan))
352
+
353
+ ### Fixed
354
+
355
+ - Require the correct digest algorithm in the `ETag` middleware. ([@matthewd](https://github.com/matthewd))
356
+
357
+ ### Documentation
358
+
359
+ - Update homepage links to use SSL. ([@hugoabonizio](https://github.com/hugoabonizio))
360
+
361
+ ## [2.0.3] - 2017-05-15
362
+
363
+ ### Changed
364
+
365
+ - Ensure `env` values are ASCII 8-bit encoded. ([@eileencodes](https://github.com/eileencodes))
366
+
367
+ ### Fixed
368
+
369
+ - Prevent exceptions when a class with mixins inherits from `Session::Abstract::ID`. ([@jnraine](https://github.com/jnraine))
370
+
371
+ ## [2.0.2] - 2017-05-08
372
+
373
+ ### Added
374
+
375
+ - Allow `Session::Abstract::SessionHash#fetch` to accept a block with a default value. ([@yannvanhalewyn](https://github.com/yannvanhalewyn))
376
+ - Add `Builder#freeze_app` to freeze application and all middleware. ([@jeremyevans](https://github.com/jeremyevans))
377
+
378
+ ### Changed
379
+
380
+ - Freeze default session options to avoid accidental mutation. ([@kirs](https://github.com/kirs))
381
+ - Detect partial hijack without hash headers. ([@devmchakan](https://github.com/devmchakan))
382
+ - Update tests to use MiniTest 6 matchers. ([@tonytonyjan](https://github.com/tonytonyjan))
383
+ - Allow 205 Reset Content responses to set a Content-Length, as RFC 7231 proposes setting this to 0. ([@devmchakan](https://github.com/devmchakan))
384
+
385
+ ### Fixed
386
+
387
+ - Handle `NULL` bytes in multipart filenames. ([@casperisfine](https://github.com/casperisfine))
388
+ - Remove warnings due to miscapitalized global. ([@ioquatix](https://github.com/ioquatix))
389
+ - Prevent exceptions caused by a race condition on multi-threaded servers. ([@sophiedeziel](https://github.com/sophiedeziel))
390
+ - Add RDoc as an explicit depencency for `doc` group. ([@tonytonyjan](https://github.com/tonytonyjan))
391
+ - Record errors originating from `Multipart::Parser` in the `MethodOverride` middleware instead of letting them bubble up. ([@carlzulauf](https://github.com/carlzulauf))
392
+ - Remove remaining use of removed `Utils#bytesize` method from the `File` middleware. ([@brauliomartinezlm](https://github.com/brauliomartinezlm))
393
+
394
+ ### Removed
395
+
396
+ - Remove `deflate` encoding support to reduce caching overhead. ([@devmchakan](https://github.com/devmchakan))
397
+
398
+ ### Documentation
399
+
400
+ - Update broken example in `Deflater` documentation. ([@mwpastore](https://github.com/mwpastore))
401
+
402
+ ## [2.0.1] - 2016-06-30
403
+
404
+ ### Changed
405
+
406
+ - Remove JSON as an explicit dependency. ([@mperham](https://github.com/mperham))
407
+
408
+
409
+ # History/News Archive
410
+ Items below this line are from the previously maintained HISTORY.md and NEWS.md files.
411
+
412
+ ## [2.0.0.rc1] 2016-05-06
413
+ - Rack::Session::Abstract::ID is deprecated. Please change to use Rack::Session::Abstract::Persisted
414
+
415
+ ## [2.0.0.alpha] 2015-12-04
416
+ - First-party "SameSite" cookies. Browsers omit SameSite cookies from third-party requests, closing the door on many CSRF attacks.
417
+ - 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
418
+ - Based on version 7 of the Same-site Cookies internet draft:
419
+ https://tools.ietf.org/html/draft-west-first-party-cookies-07
420
+ - Thanks to Ben Toews (@mastahyeti) and Bob Long (@bobjflong) for updating to drafts 5 and 7.
421
+ - 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.
422
+ - Add `Rack::Request#authority` to calculate the authority under which the response is being made (this will be handy for h2 pushes).
423
+ - Add `Rack::Response::Helpers#cache_control` and `cache_control=`. Use this for setting cache control headers on your response objects.
424
+ - Add `Rack::Response::Helpers#etag` and `etag=`. Use this for setting etag values on the response.
425
+ - 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.
426
+ - Add `Rack::Request#add_header` to match.
427
+ - `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.
428
+ - 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
429
+ - 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).
430
+ - 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
431
+ - Tempfiles are automatically closed in the case that there were too
432
+ many posted.
433
+ - Added methods for manipulating response headers that don't assume
434
+ they're stored as a Hash. Response-like classes may include the
435
+ Rack::Response::Helpers module if they define these methods:
436
+ - Rack::Response#has_header?
437
+ - Rack::Response#get_header
438
+ - Rack::Response#set_header
439
+ - Rack::Response#delete_header
440
+ - 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.
441
+ - 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).
442
+ - Add `Rack::Request#initialize_copy` so that the env is duped when the request gets duped.
443
+ - Added methods for manipulating request specific data. This includes
444
+ data set as CGI parameters, and just any arbitrary data the user wants
445
+ to associate with a particular request. New methods:
446
+ - Rack::Request#has_header?
447
+ - Rack::Request#get_header
448
+ - Rack::Request#fetch_header
449
+ - Rack::Request#each_header
450
+ - Rack::Request#set_header
451
+ - Rack::Request#delete_header
452
+ - lib/rack/utils.rb: add a method for constructing "delete" cookie
453
+ headers. This allows us to construct cookie headers without depending
454
+ on the side effects of mutating a hash.
455
+ - Prevent extremely deep parameters from being parsed. CVE-2015-3225
456
+
457
+ ## [1.6.1] 2015-05-06
458
+ - Fix CVE-2014-9490, denial of service attack in OkJson
459
+ - Use a monotonic time for Rack::Runtime, if available
460
+ - RACK_MULTIPART_LIMIT changed to RACK_MULTIPART_PART_LIMIT (RACK_MULTIPART_LIMIT is deprecated and will be removed in 1.7.0)
461
+
462
+ ## [1.5.3] 2015-05-06
463
+ - Fix CVE-2014-9490, denial of service attack in OkJson
464
+ - Backport bug fixes to 1.5 series
465
+
466
+ ## [1.6.0] 2014-01-18
467
+ - Response#unauthorized? helper
468
+ - Deflater now accepts an options hash to control compression on a per-request level
469
+ - Builder#warmup method for app preloading
470
+ - Request#accept_language method to extract HTTP_ACCEPT_LANGUAGE
471
+ - Add quiet mode of rack server, rackup --quiet
472
+ - Update HTTP Status Codes to RFC 7231
473
+ - Less strict header name validation according to RFC 2616
474
+ - SPEC updated to specify headers conform to RFC7230 specification
475
+ - Etag correctly marks etags as weak
476
+ - Request#port supports multiple x-http-forwarded-proto values
477
+ - Utils#multipart_part_limit configures the maximum number of parts a request can contain
478
+ - Default host to localhost when in development mode
479
+ - Various bugfixes and performance improvements
480
+
481
+ ## [1.5.2] 2013-02-07
482
+ - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
483
+ - Fix CVE-2013-0262, symlink path traversal in Rack::File
484
+ - Add various methods to Session for enhanced Rails compatibility
485
+ - Request#trusted_proxy? now only matches whole strings
486
+ - Add JSON cookie coder, to be default in Rack 1.6+ due to security concerns
487
+ - URLMap host matching in environments that don't set the Host header fixed
488
+ - Fix a race condition that could result in overwritten pidfiles
489
+ - Various documentation additions
490
+
491
+ ## [1.4.5] 2013-02-07
492
+ - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
493
+ - Fix CVE-2013-0262, symlink path traversal in Rack::File
494
+
495
+ ## [1.1.6, 1.2.8, 1.3.10] 2013-02-07
496
+ - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
497
+
498
+ ## [1.5.1] 2013-01-28
499
+ - Rack::Lint check_hijack now conforms to other parts of SPEC
500
+ - Added hash-like methods to Abstract::ID::SessionHash for compatibility
501
+ - Various documentation corrections
502
+
503
+ ## [1.5.0] 2013-01-21
504
+ - Introduced hijack SPEC, for before-response and after-response hijacking
505
+ - SessionHash is no longer a Hash subclass
506
+ - Rack::File cache_control parameter is removed, in place of headers options
507
+ - Rack::Auth::AbstractRequest#scheme now yields strings, not symbols
508
+ - Rack::Utils cookie functions now format expires in RFC 2822 format
509
+ - Rack::File now has a default mime type
510
+ - rackup -b 'run Rack::Files.new(".")', option provides command line configs
511
+ - Rack::Deflater will no longer double encode bodies
512
+ - Rack::Mime#match? provides convenience for Accept header matching
513
+ - Rack::Utils#q_values provides splitting for Accept headers
514
+ - Rack::Utils#best_q_match provides a helper for Accept headers
515
+ - Rack::Handler.pick provides convenience for finding available servers
516
+ - Puma added to the list of default servers (preferred over Webrick)
517
+ - Various middleware now correctly close body when replacing it
518
+ - Rack::Request#params is no longer persistent with only GET params
519
+ - Rack::Request#update_param and #delete_param provide persistent operations
520
+ - Rack::Request#trusted_proxy? now returns true for local unix sockets
521
+ - Rack::Response no longer forces Content-Types
522
+ - Rack::Sendfile provides local mapping configuration options
523
+ - Rack::Utils#rfc2109 provides old netscape style time output
524
+ - Updated HTTP status codes
525
+ - Ruby 1.8.6 likely no longer passes tests, and is no longer fully supported
526
+
527
+ ## [1.4.4, 1.3.9, 1.2.7, 1.1.5] 2013-01-13
528
+ - [SEC] Rack::Auth::AbstractRequest no longer symbolizes arbitrary strings
529
+ - Fixed erroneous test case in the 1.3.x series
530
+
531
+ ## [1.4.3] 2013-01-07
532
+ - Security: Prevent unbounded reads in large multipart boundaries
533
+
534
+ ## [1.3.8] 2013-01-07
535
+ - Security: Prevent unbounded reads in large multipart boundaries
536
+
537
+ ## [1.4.2] 2013-01-06
538
+ - Add warnings when users do not provide a session secret
539
+ - Fix parsing performance for unquoted filenames
540
+ - Updated URI backports
541
+ - Fix URI backport version matching, and silence constant warnings
542
+ - Correct parameter parsing with empty values
543
+ - Correct rackup '-I' flag, to allow multiple uses
544
+ - Correct rackup pidfile handling
545
+ - Report rackup line numbers correctly
546
+ - Fix request loops caused by non-stale nonces with time limits
547
+ - Fix reloader on Windows
548
+ - Prevent infinite recursions from Response#to_ary
549
+ - Various middleware better conforms to the body close specification
550
+ - Updated language for the body close specification
551
+ - Additional notes regarding ECMA escape compatibility issues
552
+ - Fix the parsing of multiple ranges in range headers
553
+ - Prevent errors from empty parameter keys
554
+ - Added PATCH verb to Rack::Request
555
+ - Various documentation updates
556
+ - Fix session merge semantics (fixes rack-test)
557
+ - Rack::Static :index can now handle multiple directories
558
+ - All tests now utilize Rack::Lint (special thanks to Lars Gierth)
559
+ - Rack::File cache_control parameter is now deprecated, and removed by 1.5
560
+ - Correct Rack::Directory script name escaping
561
+ - Rack::Static supports header rules for sophisticated configurations
562
+ - Multipart parsing now works without a Content-Length header
563
+ - New logos courtesy of Zachary Scott!
564
+ - Rack::BodyProxy now explicitly defines #each, useful for C extensions
565
+ - Cookies that are not URI escaped no longer cause exceptions
566
+
567
+ ## [1.3.7] 2013-01-06
568
+ - Add warnings when users do not provide a session secret
569
+ - Fix parsing performance for unquoted filenames
570
+ - Updated URI backports
571
+ - Fix URI backport version matching, and silence constant warnings
572
+ - Correct parameter parsing with empty values
573
+ - Correct rackup '-I' flag, to allow multiple uses
574
+ - Correct rackup pidfile handling
575
+ - Report rackup line numbers correctly
576
+ - Fix request loops caused by non-stale nonces with time limits
577
+ - Fix reloader on Windows
578
+ - Prevent infinite recursions from Response#to_ary
579
+ - Various middleware better conforms to the body close specification
580
+ - Updated language for the body close specification
581
+ - Additional notes regarding ECMA escape compatibility issues
582
+ - Fix the parsing of multiple ranges in range headers
583
+
584
+ ## [1.2.6] 2013-01-06
585
+ - Add warnings when users do not provide a session secret
586
+ - Fix parsing performance for unquoted filenames
587
+
588
+ ## [1.1.4] 2013-01-06
589
+ - Add warnings when users do not provide a session secret
590
+
591
+ ## [1.4.1] 2012-01-22
592
+ - Alter the keyspace limit calculations to reduce issues with nested params
593
+ - Add a workaround for multipart parsing where files contain unescaped "%"
594
+ - Added Rack::Response::Helpers#method_not_allowed? (code 405)
595
+ - Rack::File now returns 404 for illegal directory traversals
596
+ - Rack::File now returns 405 for illegal methods (non HEAD/GET)
597
+ - Rack::Cascade now catches 405 by default, as well as 404
598
+ - Cookies missing '--' no longer cause an exception to be raised
599
+ - Various style changes and documentation spelling errors
600
+ - Rack::BodyProxy always ensures to execute its block
601
+ - Additional test coverage around cookies and secrets
602
+ - Rack::Session::Cookie can now be supplied either secret or old_secret
603
+ - Tests are no longer dependent on set order
604
+ - Rack::Static no longer defaults to serving index files
605
+ - Rack.release was fixed
606
+
607
+ ## [1.4.0] 2011-12-28
608
+ - Ruby 1.8.6 support has officially been dropped. Not all tests pass.
609
+ - Raise sane error messages for broken config.ru
610
+ - Allow combining run and map in a config.ru
611
+ - Rack::ContentType will not set Content-Type for responses without a body
612
+ - Status code 205 does not send a response body
613
+ - Rack::Response::Helpers will not rely on instance variables
614
+ - Rack::Utils.build_query no longer outputs '=' for nil query values
615
+ - Various mime types added
616
+ - Rack::MockRequest now supports HEAD
617
+ - Rack::Directory now supports files that contain RFC3986 reserved chars
618
+ - Rack::File now only supports GET and HEAD requests
619
+ - Rack::Server#start now passes the block to Rack::Handler::<h>#run
620
+ - Rack::Static now supports an index option
621
+ - Added the Teapot status code
622
+ - rackup now defaults to Thin instead of Mongrel (if installed)
623
+ - Support added for HTTP_X_FORWARDED_SCHEME
624
+ - Numerous bug fixes, including many fixes for new and alternate rubies
625
+
626
+ ## [1.1.3] 2011-12-28
627
+ - Security fix. http://www.ocert.org/advisories/ocert-2011-003.html
628
+ Further information here: http://jruby.org/2011/12/27/jruby-1-6-5-1
629
+
630
+ ## [1.3.5] 2011-10-17
631
+ - Fix annoying warnings caused by the backport in 1.3.4
632
+
633
+ ## [1.3.4] 2011-10-01
634
+ - Backport security fix from 1.9.3, also fixes some roundtrip issues in URI
635
+ - Small documentation update
636
+ - Fix an issue where BodyProxy could cause an infinite recursion
637
+ - Add some supporting files for travis-ci
638
+
639
+ ## [1.2.4] 2011-09-16
640
+ - Fix a bug with MRI regex engine to prevent XSS by malformed unicode
641
+
642
+ ## [1.3.3] 2011-09-16
643
+ - Fix bug with broken query parameters in Rack::ShowExceptions
644
+ - Rack::Request#cookies no longer swallows exceptions on broken input
645
+ - Prevents XSS attacks enabled by bug in Ruby 1.8's regexp engine
646
+ - Rack::ConditionalGet handles broken If-Modified-Since helpers
647
+
648
+ ## [1.3.2] 2011-07-16
649
+ - Fix for Rails and rack-test, Rack::Utils#escape calls to_s
650
+
651
+ ## [1.3.1] 2011-07-13
652
+ - Fix 1.9.1 support
653
+ - Fix JRuby support
654
+ - Properly handle $KCODE in Rack::Utils.escape
655
+ - Make method_missing/respond_to behavior consistent for Rack::Lock,
656
+ Rack::Auth::Digest::Request and Rack::Multipart::UploadedFile
657
+ - Reenable passing rack.session to session middleware
658
+ - Rack::CommonLogger handles streaming responses correctly
659
+ - Rack::MockResponse calls close on the body object
660
+ - Fix a DOS vector from MRI stdlib backport
661
+
662
+ ## [1.2.3] 2011-05-22
663
+ - Pulled in relevant bug fixes from 1.3
664
+ - Fixed 1.8.6 support
665
+
666
+ ## [1.3.0] 2011-05-22
667
+ - Various performance optimizations
668
+ - Various multipart fixes
669
+ - Various multipart refactors
670
+ - Infinite loop fix for multipart
671
+ - Test coverage for Rack::Server returns
672
+ - Allow files with '..', but not path components that are '..'
673
+ - rackup accepts handler-specific options on the command line
674
+ - Request#params no longer merges POST into GET (but returns the same)
675
+ - Use URI.encode_www_form_component instead. Use core methods for escaping.
676
+ - Allow multi-line comments in the config file
677
+ - Bug L#94 reported by Nikolai Lugovoi, query parameter unescaping.
678
+ - Rack::Response now deletes Content-Length when appropriate
679
+ - Rack::Deflater now supports streaming
680
+ - Improved Rack::Handler loading and searching
681
+ - Support for the PATCH verb
682
+ - env['rack.session.options'] now contains session options
683
+ - Cookies respect renew
684
+ - Session middleware uses SecureRandom.hex
685
+
686
+ ## [1.2.2, 1.1.2] 2011-03-13
687
+ - Security fix in Rack::Auth::Digest::MD5: when authenticator
688
+ returned nil, permission was granted on empty password.
689
+
690
+ ## [1.2.1] 2010-06-15
691
+ - Make CGI handler rewindable
692
+ - Rename spec/ to test/ to not conflict with SPEC on lesser
693
+ operating systems
694
+
695
+ ## [1.2.0] 2010-06-13
696
+ - Removed Camping adapter: Camping 2.0 supports Rack as-is
697
+ - Removed parsing of quoted values
698
+ - Add Request.trace? and Request.options?
699
+ - Add mime-type for .webm and .htc
700
+ - Fix HTTP_X_FORWARDED_FOR
701
+ - Various multipart fixes
702
+ - Switch test suite to bacon
703
+
704
+ ## [1.1.0] 2010-01-03
705
+ - Moved Auth::OpenID to rack-contrib.
706
+ - SPEC change that relaxes Lint slightly to allow subclasses of the
707
+ required types
708
+ - SPEC change to document rack.input binary mode in greator detail
709
+ - SPEC define optional rack.logger specification
710
+ - File servers support X-Cascade header
711
+ - Imported Config middleware
712
+ - Imported ETag middleware
713
+ - Imported Runtime middleware
714
+ - Imported Sendfile middleware
715
+ - New Logger and NullLogger middlewares
716
+ - Added mime type for .ogv and .manifest.
717
+ - Don't squeeze PATH_INFO slashes
718
+ - Use Content-Type to determine POST params parsing
719
+ - Update Rack::Utils::HTTP_STATUS_CODES hash
720
+ - Add status code lookup utility
721
+ - Response should call #to_i on the status
722
+ - Add Request#user_agent
723
+ - Request#host knows about forwarded host
724
+ - Return an empty string for Request#host if HTTP_HOST and
725
+ SERVER_NAME are both missing
726
+ - Allow MockRequest to accept hash params
727
+ - Optimizations to HeaderHash
728
+ - Refactored rackup into Rack::Server
729
+ - Added Utils.build_nested_query to complement Utils.parse_nested_query
730
+ - Added Utils::Multipart.build_multipart to complement
731
+ Utils::Multipart.parse_multipart
732
+ - Extracted set and delete cookie helpers into Utils so they can be
733
+ used outside Response
734
+ - Extract parse_query and parse_multipart in Request so subclasses
735
+ can change their behavior
736
+ - Enforce binary encoding in RewindableInput
737
+ - Set correct external_encoding for handlers that don't use RewindableInput
738
+
739
+ ## [1.0.1] 2009-10-18
740
+ - Bump remainder of rack.versions.
741
+ - Support the pure Ruby FCGI implementation.
742
+ - Fix for form names containing "=": split first then unescape components
743
+ - Fixes the handling of the filename parameter with semicolons in names.
744
+ - Add anchor to nested params parsing regexp to prevent stack overflows
745
+ - Use more compatible gzip write api instead of "<<".
746
+ - Make sure that Reloader doesn't break when executed via ruby -e
747
+ - Make sure WEBrick respects the :Host option
748
+ - Many Ruby 1.9 fixes.
749
+
750
+ ## [1.0.0] 2009-04-25
751
+ - SPEC change: Rack::VERSION has been pushed to [1,0].
752
+ - SPEC change: header values must be Strings now, split on "\n".
753
+ - SPEC change: Content-Length can be missing, in this case chunked transfer
754
+ encoding is used.
755
+ - SPEC change: rack.input must be rewindable and support reading into
756
+ a buffer, wrap with Rack::RewindableInput if it isn't.
757
+ - SPEC change: rack.session is now specified.
758
+ - SPEC change: Bodies can now additionally respond to #to_path with
759
+ a filename to be served.
760
+ - NOTE: String bodies break in 1.9, use an Array consisting of a
761
+ single String instead.
762
+ - New middleware Rack::Lock.
763
+ - New middleware Rack::ContentType.
764
+ - Rack::Reloader has been rewritten.
765
+ - Major update to Rack::Auth::OpenID.
766
+ - Support for nested parameter parsing in Rack::Response.
767
+ - Support for redirects in Rack::Response.
768
+ - HttpOnly cookie support in Rack::Response.
769
+ - The Rakefile has been rewritten.
770
+ - Many bugfixes and small improvements.
771
+
772
+ ## [0.9.1] 2009-01-09
773
+ - Fix directory traversal exploits in Rack::File and Rack::Directory.
774
+
775
+ ## [0.9] 2009-01-06
776
+ - Rack is now managed by the Rack Core Team.
777
+ - Rack::Lint is stricter and follows the HTTP RFCs more closely.
778
+ - Added ConditionalGet middleware.
779
+ - Added ContentLength middleware.
780
+ - Added Deflater middleware.
781
+ - Added Head middleware.
782
+ - Added MethodOverride middleware.
783
+ - Rack::Mime now provides popular MIME-types and their extension.
784
+ - Mongrel Header now streams.
785
+ - Added Thin handler.
786
+ - Official support for swiftiplied Mongrel.
787
+ - Secure cookies.
788
+ - Made HeaderHash case-preserving.
789
+ - Many bugfixes and small improvements.
790
+
791
+ ## [0.4] 2008-08-21
792
+ - New middleware, Rack::Deflater, by Christoffer Sawicki.
793
+ - OpenID authentication now needs ruby-openid 2.
794
+ - New Memcache sessions, by blink.
795
+ - Explicit EventedMongrel handler, by Joshua Peek <josh@joshpeek.com>
796
+ - Rack::Reloader is not loaded in rackup development mode.
797
+ - rackup can daemonize with -D.
798
+ - Many bugfixes, especially for pool sessions, URLMap, thread safety
799
+ and tempfile handling.
800
+ - Improved tests.
801
+ - Rack moved to Git.
802
+
803
+ ## [0.3] 2008-02-26
804
+ - LiteSpeed handler, by Adrian Madrid.
805
+ - SCGI handler, by Jeremy Evans.
806
+ - Pool sessions, by blink.
807
+ - OpenID authentication, by blink.
808
+ - :Port and :File options for opening FastCGI sockets, by blink.
809
+ - Last-Modified HTTP header for Rack::File, by blink.
810
+ - Rack::Builder#use now accepts blocks, by Corey Jewett.
811
+ (See example/protectedlobster.ru)
812
+ - HTTP status 201 can contain a Content-Type and a body now.
813
+ - Many bugfixes, especially related to Cookie handling.
814
+
815
+ ## [0.2] 2007-05-16
816
+ - HTTP Basic authentication.
817
+ - Cookie Sessions.
818
+ - Static file handler.
819
+ - Improved Rack::Request.
820
+ - Improved Rack::Response.
821
+ - Added Rack::ShowStatus, for better default error messages.
822
+ - Bug fixes in the Camping adapter.
823
+ - Removed Rails adapter, was too alpha.
824
+
825
+ ## [0.1] 2007-03-03
826
+
827
+ [@ioquatix]: https://github.com/ioquatix "Samuel Williams"
828
+ [@jeremyevans]: https://github.com/jeremyevans "Jeremy Evans"
829
+ [@earlopain]: https://github.com/earlopain "Earlopain"