rack 2.0.9.3 → 3.0.0

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 (201) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +808 -0
  3. data/CONTRIBUTING.md +142 -0
  4. data/{COPYING → MIT-LICENSE} +4 -2
  5. data/README.md +293 -0
  6. data/SPEC.rdoc +340 -0
  7. data/lib/rack/auth/abstract/handler.rb +6 -2
  8. data/lib/rack/auth/abstract/request.rb +4 -2
  9. data/lib/rack/auth/basic.rb +7 -4
  10. data/lib/rack/auth/digest/md5.rb +1 -129
  11. data/lib/rack/auth/digest/nonce.rb +1 -51
  12. data/lib/rack/auth/digest/params.rb +1 -52
  13. data/lib/rack/auth/digest/request.rb +1 -41
  14. data/lib/rack/auth/digest.rb +256 -0
  15. data/lib/rack/body_proxy.rb +18 -15
  16. data/lib/rack/builder.rb +151 -40
  17. data/lib/rack/cascade.rb +30 -12
  18. data/lib/rack/chunked.rb +74 -23
  19. data/lib/rack/common_logger.rb +49 -36
  20. data/lib/rack/conditional_get.rb +33 -26
  21. data/lib/rack/config.rb +2 -0
  22. data/lib/rack/constants.rb +63 -0
  23. data/lib/rack/content_length.rb +13 -16
  24. data/lib/rack/content_type.rb +12 -8
  25. data/lib/rack/deflater.rb +84 -45
  26. data/lib/rack/directory.rb +90 -64
  27. data/lib/rack/etag.rb +17 -23
  28. data/lib/rack/events.rb +23 -20
  29. data/lib/rack/file.rb +5 -172
  30. data/lib/rack/files.rb +216 -0
  31. data/lib/rack/head.rb +10 -9
  32. data/lib/rack/headers.rb +154 -0
  33. data/lib/rack/lint.rb +786 -645
  34. data/lib/rack/lock.rb +4 -6
  35. data/lib/rack/logger.rb +4 -0
  36. data/lib/rack/media_type.rb +10 -5
  37. data/lib/rack/method_override.rb +8 -2
  38. data/lib/rack/mime.rb +17 -1
  39. data/lib/rack/mock.rb +2 -195
  40. data/lib/rack/mock_request.rb +166 -0
  41. data/lib/rack/mock_response.rb +126 -0
  42. data/lib/rack/multipart/generator.rb +21 -15
  43. data/lib/rack/multipart/parser.rb +161 -118
  44. data/lib/rack/multipart/uploaded_file.rb +19 -7
  45. data/lib/rack/multipart.rb +23 -41
  46. data/lib/rack/null_logger.rb +11 -0
  47. data/lib/rack/query_parser.rb +126 -65
  48. data/lib/rack/recursive.rb +9 -5
  49. data/lib/rack/reloader.rb +6 -4
  50. data/lib/rack/request.rb +331 -74
  51. data/lib/rack/response.rb +223 -70
  52. data/lib/rack/rewindable_input.rb +28 -8
  53. data/lib/rack/runtime.rb +11 -8
  54. data/lib/rack/sendfile.rb +42 -33
  55. data/lib/rack/show_exceptions.rb +35 -18
  56. data/lib/rack/show_status.rb +25 -15
  57. data/lib/rack/static.rb +30 -18
  58. data/lib/rack/tempfile_reaper.rb +16 -5
  59. data/lib/rack/urlmap.rb +14 -6
  60. data/lib/rack/utils.rb +268 -260
  61. data/lib/rack/version.rb +34 -0
  62. data/lib/rack.rb +15 -92
  63. metadata +44 -207
  64. data/HISTORY.md +0 -520
  65. data/README.rdoc +0 -316
  66. data/Rakefile +0 -116
  67. data/SPEC +0 -263
  68. data/bin/rackup +0 -4
  69. data/contrib/rack.png +0 -0
  70. data/contrib/rack.svg +0 -150
  71. data/contrib/rack_logo.svg +0 -164
  72. data/contrib/rdoc.css +0 -412
  73. data/example/lobster.ru +0 -4
  74. data/example/protectedlobster.rb +0 -14
  75. data/example/protectedlobster.ru +0 -8
  76. data/lib/rack/handler/cgi.rb +0 -60
  77. data/lib/rack/handler/fastcgi.rb +0 -100
  78. data/lib/rack/handler/lsws.rb +0 -61
  79. data/lib/rack/handler/scgi.rb +0 -70
  80. data/lib/rack/handler/thin.rb +0 -36
  81. data/lib/rack/handler/webrick.rb +0 -120
  82. data/lib/rack/handler.rb +0 -99
  83. data/lib/rack/lobster.rb +0 -70
  84. data/lib/rack/server.rb +0 -395
  85. data/lib/rack/session/abstract/id.rb +0 -510
  86. data/lib/rack/session/cookie.rb +0 -204
  87. data/lib/rack/session/memcache.rb +0 -99
  88. data/lib/rack/session/pool.rb +0 -83
  89. data/rack.gemspec +0 -34
  90. data/test/builder/an_underscore_app.rb +0 -5
  91. data/test/builder/anything.rb +0 -5
  92. data/test/builder/comment.ru +0 -4
  93. data/test/builder/end.ru +0 -5
  94. data/test/builder/line.ru +0 -1
  95. data/test/builder/options.ru +0 -2
  96. data/test/cgi/assets/folder/test.js +0 -1
  97. data/test/cgi/assets/fonts/font.eot +0 -1
  98. data/test/cgi/assets/images/image.png +0 -1
  99. data/test/cgi/assets/index.html +0 -1
  100. data/test/cgi/assets/javascripts/app.js +0 -1
  101. data/test/cgi/assets/stylesheets/app.css +0 -1
  102. data/test/cgi/lighttpd.conf +0 -26
  103. data/test/cgi/rackup_stub.rb +0 -6
  104. data/test/cgi/sample_rackup.ru +0 -5
  105. data/test/cgi/test +0 -9
  106. data/test/cgi/test+directory/test+file +0 -1
  107. data/test/cgi/test.fcgi +0 -9
  108. data/test/cgi/test.gz +0 -0
  109. data/test/cgi/test.ru +0 -5
  110. data/test/gemloader.rb +0 -10
  111. data/test/helper.rb +0 -34
  112. data/test/multipart/bad_robots +0 -259
  113. data/test/multipart/binary +0 -0
  114. data/test/multipart/content_type_and_no_filename +0 -6
  115. data/test/multipart/empty +0 -10
  116. data/test/multipart/fail_16384_nofile +0 -814
  117. data/test/multipart/file1.txt +0 -1
  118. data/test/multipart/filename_and_modification_param +0 -7
  119. data/test/multipart/filename_and_no_name +0 -6
  120. data/test/multipart/filename_with_encoded_words +0 -7
  121. data/test/multipart/filename_with_escaped_quotes +0 -6
  122. data/test/multipart/filename_with_escaped_quotes_and_modification_param +0 -7
  123. data/test/multipart/filename_with_null_byte +0 -7
  124. data/test/multipart/filename_with_percent_escaped_quotes +0 -6
  125. data/test/multipart/filename_with_single_quote +0 -7
  126. data/test/multipart/filename_with_unescaped_percentages +0 -6
  127. data/test/multipart/filename_with_unescaped_percentages2 +0 -6
  128. data/test/multipart/filename_with_unescaped_percentages3 +0 -6
  129. data/test/multipart/filename_with_unescaped_quotes +0 -6
  130. data/test/multipart/ie +0 -6
  131. data/test/multipart/invalid_character +0 -6
  132. data/test/multipart/mixed_files +0 -21
  133. data/test/multipart/nested +0 -10
  134. data/test/multipart/none +0 -9
  135. data/test/multipart/quoted +0 -15
  136. data/test/multipart/rack-logo.png +0 -0
  137. data/test/multipart/semicolon +0 -6
  138. data/test/multipart/text +0 -15
  139. data/test/multipart/three_files_three_fields +0 -31
  140. data/test/multipart/unity3d_wwwform +0 -11
  141. data/test/multipart/webkit +0 -32
  142. data/test/rackup/config.ru +0 -31
  143. data/test/registering_handler/rack/handler/registering_myself.rb +0 -8
  144. data/test/spec_auth_basic.rb +0 -89
  145. data/test/spec_auth_digest.rb +0 -260
  146. data/test/spec_body_proxy.rb +0 -85
  147. data/test/spec_builder.rb +0 -233
  148. data/test/spec_cascade.rb +0 -63
  149. data/test/spec_cgi.rb +0 -84
  150. data/test/spec_chunked.rb +0 -103
  151. data/test/spec_common_logger.rb +0 -107
  152. data/test/spec_conditional_get.rb +0 -103
  153. data/test/spec_config.rb +0 -23
  154. data/test/spec_content_length.rb +0 -86
  155. data/test/spec_content_type.rb +0 -46
  156. data/test/spec_deflater.rb +0 -375
  157. data/test/spec_directory.rb +0 -148
  158. data/test/spec_etag.rb +0 -108
  159. data/test/spec_events.rb +0 -133
  160. data/test/spec_fastcgi.rb +0 -85
  161. data/test/spec_file.rb +0 -264
  162. data/test/spec_handler.rb +0 -57
  163. data/test/spec_head.rb +0 -46
  164. data/test/spec_lint.rb +0 -520
  165. data/test/spec_lobster.rb +0 -59
  166. data/test/spec_lock.rb +0 -204
  167. data/test/spec_logger.rb +0 -24
  168. data/test/spec_media_type.rb +0 -42
  169. data/test/spec_method_override.rb +0 -110
  170. data/test/spec_mime.rb +0 -51
  171. data/test/spec_mock.rb +0 -359
  172. data/test/spec_multipart.rb +0 -721
  173. data/test/spec_null_logger.rb +0 -21
  174. data/test/spec_recursive.rb +0 -75
  175. data/test/spec_request.rb +0 -1423
  176. data/test/spec_response.rb +0 -528
  177. data/test/spec_rewindable_input.rb +0 -128
  178. data/test/spec_runtime.rb +0 -50
  179. data/test/spec_sendfile.rb +0 -125
  180. data/test/spec_server.rb +0 -193
  181. data/test/spec_session_abstract_id.rb +0 -31
  182. data/test/spec_session_abstract_session_hash.rb +0 -45
  183. data/test/spec_session_cookie.rb +0 -442
  184. data/test/spec_session_memcache.rb +0 -357
  185. data/test/spec_session_persisted_secure_secure_session_hash.rb +0 -73
  186. data/test/spec_session_pool.rb +0 -247
  187. data/test/spec_show_exceptions.rb +0 -93
  188. data/test/spec_show_status.rb +0 -104
  189. data/test/spec_static.rb +0 -184
  190. data/test/spec_tempfile_reaper.rb +0 -64
  191. data/test/spec_thin.rb +0 -96
  192. data/test/spec_urlmap.rb +0 -237
  193. data/test/spec_utils.rb +0 -742
  194. data/test/spec_version.rb +0 -11
  195. data/test/spec_webrick.rb +0 -206
  196. data/test/static/another/index.html +0 -1
  197. data/test/static/foo.html +0 -1
  198. data/test/static/index.html +0 -1
  199. data/test/testrequest.rb +0 -78
  200. data/test/unregistered_handler/rack/handler/unregistered.rb +0 -7
  201. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -7
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,142 @@
1
+ # Contributing to Rack
2
+
3
+ Rack is work of [hundreds of
4
+ contributors](https://github.com/rack/rack/graphs/contributors). You're
5
+ encouraged to submit [pull requests](https://github.com/rack/rack/pulls) and
6
+ [propose features and discuss issues](https://github.com/rack/rack/issues).
7
+
8
+ ## Fork the Project
9
+
10
+ Fork the [project on GitHub](https://github.com/rack/rack) and check out your
11
+ copy.
12
+
13
+ ```
14
+ git clone https://github.com/(your-github-username)/rack.git
15
+ cd rack
16
+ git remote add upstream https://github.com/rack/rack.git
17
+ ```
18
+
19
+ ## Create a Topic Branch
20
+
21
+ Make sure your fork is up-to-date and create a topic branch for your feature or
22
+ bug fix.
23
+
24
+ ```
25
+ git checkout main
26
+ git pull upstream main
27
+ git checkout -b my-feature-branch
28
+ ```
29
+
30
+ ## Bundle Install and Quick Test
31
+
32
+ Ensure that you can build the project and run quick tests.
33
+
34
+ ```
35
+ bundle install --without extra
36
+ bundle exec rake test
37
+ ```
38
+
39
+ ## Running All Tests
40
+
41
+ Install all dependencies.
42
+
43
+ ```
44
+ bundle install
45
+ ```
46
+
47
+ Run all tests.
48
+
49
+ ```
50
+ rake test
51
+ ```
52
+
53
+ ## Write Tests
54
+
55
+ Try to write a test that reproduces the problem you're trying to fix or
56
+ describes a feature that you want to build.
57
+
58
+ We definitely appreciate pull requests that highlight or reproduce a problem,
59
+ even without a fix.
60
+
61
+ ## Write Code
62
+
63
+ Implement your feature or bug fix.
64
+
65
+ Make sure that all tests pass:
66
+
67
+ ```
68
+ bundle exec rake test
69
+ ```
70
+
71
+ ## Write Documentation
72
+
73
+ Document any external behavior in the [README](README.md).
74
+
75
+ ## Update Changelog
76
+
77
+ Add a line to [CHANGELOG](CHANGELOG.md).
78
+
79
+ ## Commit Changes
80
+
81
+ Make sure git knows your name and email address:
82
+
83
+ ```
84
+ git config --global user.name "Your Name"
85
+ git config --global user.email "contributor@example.com"
86
+ ```
87
+
88
+ Writing good commit logs is important. A commit log should describe what changed
89
+ and why.
90
+
91
+ ```
92
+ git add ...
93
+ git commit
94
+ ```
95
+
96
+ ## Push
97
+
98
+ ```
99
+ git push origin my-feature-branch
100
+ ```
101
+
102
+ ## Make a Pull Request
103
+
104
+ Go to your fork of rack on GitHub and select your feature branch. Click the
105
+ 'Pull Request' button and fill out the form. Pull requests are usually
106
+ reviewed within a few days.
107
+
108
+ ## Rebase
109
+
110
+ If you've been working on a change for a while, rebase with upstream/main.
111
+
112
+ ```
113
+ git fetch upstream
114
+ git rebase upstream/main
115
+ git push origin my-feature-branch -f
116
+ ```
117
+
118
+ ## Make Required Changes
119
+
120
+ Amend your previous commit and force push the changes.
121
+
122
+ ```
123
+ git commit --amend
124
+ git push origin my-feature-branch -f
125
+ ```
126
+
127
+ ## Check on Your Pull Request
128
+
129
+ Go back to your pull request after a few minutes and see whether it passed
130
+ tests with GitHub Actions. Everything should look green, otherwise fix issues and
131
+ amend your commit as described above.
132
+
133
+ ## Be Patient
134
+
135
+ It's likely that your change will not be merged and that the nitpicky
136
+ maintainers will ask you to do more, or fix seemingly benign problems. Hang in
137
+ there!
138
+
139
+ ## Thank You
140
+
141
+ Please do know that we really appreciate and value your time and work. We love
142
+ you, really.
@@ -1,4 +1,6 @@
1
- Copyright (c) 2007-2016 Christian Neukirchen <purl.org/net/chneukirchen>
1
+ The MIT License (MIT)
2
+
3
+ Copyright (C) 2007-2021 Leah Neukirchen <http://leahneukirchen.org/infopage.html>
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
6
  of this software and associated documentation files (the "Software"), to
@@ -13,6 +15,6 @@ all copies or substantial portions of the Software.
13
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
- THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
19
  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
20
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,293 @@
1
+ # ![Rack](contrib/logo.webp)
2
+
3
+ > **_NOTE:_** Rack v3.0.0.beta1 was recently released. Please check the [Upgrade
4
+ > Guide](UPGRADE-GUIDE.md) for more details about migrating your existing
5
+ > servers, middlewares and applications. For detailed information on specific
6
+ > changes, check the [Change Log](CHANGELOG.md).
7
+
8
+ Rack provides a minimal, modular, and adaptable interface for developing web
9
+ applications in Ruby. By wrapping HTTP requests and responses in the simplest
10
+ way possible, it unifies and distills the bridge between web servers, web
11
+ frameworks, and web application into a single method call.
12
+
13
+ The exact details of this are described in the [Rack Specification], which all
14
+ Rack applications should conform to.
15
+
16
+ ## Installation
17
+
18
+ Add the rack gem to your application bundle, or follow the instructions provided
19
+ by a [supported web framework](#supported-web-frameworks):
20
+
21
+ ```bash
22
+ # Install it generally:
23
+ $ gem install rack --pre
24
+
25
+ # or, add it to your current application gemfile:
26
+ $ bundle add rack --version 3.0.0.beta1
27
+ ```
28
+
29
+ If you need features from `Rack::Session` or `bin/rackup` please add those gems separately.
30
+
31
+ ```bash
32
+ $ gem install rack-session rackup
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ Create a file called `config.ru` with the following contents:
38
+
39
+ ```ruby
40
+ run do |env|
41
+ [200, {}, ["Hello World"]]
42
+ end
43
+ ```
44
+
45
+ Run this using the rackup gem or another [supported web
46
+ server](#supported-web-servers).
47
+
48
+ ```bash
49
+ $ gem install rackup
50
+ $ rackup
51
+ $ curl http://localhost:9292
52
+ Hello World
53
+ ```
54
+
55
+ ## Supported web servers
56
+
57
+ Rack is supported by a wide range of servers, including:
58
+
59
+ * [Agoo](https://github.com/ohler55/agoo)
60
+ * [Falcon](https://github.com/socketry/falcon) **(Rack 3 Compatible)**
61
+ * [Iodine](https://github.com/boazsegev/iodine)
62
+ * [NGINX Unit](https://unit.nginx.org/)
63
+ * [Phusion Passenger](https://www.phusionpassenger.com/) (which is mod_rack for
64
+ Apache and for nginx)
65
+ * [Puma](https://puma.io/)
66
+ * [Thin](https://github.com/macournoyer/thin)
67
+ * [Unicorn](https://yhbt.net/unicorn/)
68
+ * [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/)
69
+ * [Lamby](https://lamby.custominktech.com) (for AWS Lambda)
70
+
71
+ You will need to consult the server documentation to find out what features and
72
+ limitations they may have. In general, any valid Rack app will run the same on
73
+ all these servers, without changing anything.
74
+
75
+ ### Rackup
76
+
77
+ Rack provides a separate gem, [rackup](https://github.com/rack/rackup) which is
78
+ a generic interface for running a Rack application on supported servers, which
79
+ include `WEBRick`, `Puma`, `Falcon` and others.
80
+
81
+ ## Supported web frameworks
82
+
83
+ These frameworks and many others support the [Rack Specification]:
84
+
85
+ * [Camping](https://github.com/camping/camping)
86
+ * [Hanami](https://hanamirb.org/)
87
+ * [Padrino](https://padrinorb.com/)
88
+ * [Roda](https://github.com/jeremyevans/roda) **(Rack 3 Compatible)**
89
+ * [Ruby on Rails](https://rubyonrails.org/)
90
+ * [Sinatra](https://sinatrarb.com/)
91
+ * [Utopia](https://github.com/socketry/utopia) **(Rack 3 Compatible)**
92
+ * [WABuR](https://github.com/ohler55/wabur)
93
+
94
+ ### Older (possibly unsupported) web frameworks
95
+
96
+ * [Ramaze](http://ramaze.net/)
97
+ * [Rum](https://github.com/leahneukirchen/rum)
98
+
99
+ ## Available middleware shipped with Rack
100
+
101
+ Between the server and the framework, Rack can be customized to your
102
+ applications needs using middleware. Rack itself ships with the following
103
+ middleware:
104
+
105
+ * `Rack::CommonLogger` for creating Apache-style logfiles.
106
+ * `Rack::ConditionalGet` for returning [Not
107
+ Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304)
108
+ responses when the response has not changed.
109
+ * `Rack::Config` for modifying the environment before processing the request.
110
+ * `Rack::ContentLength` for setting a `content-length` header based on body
111
+ size.
112
+ * `Rack::ContentType` for setting a default `content-type` header for responses.
113
+ * `Rack::Deflater` for compressing responses with gzip.
114
+ * `Rack::ETag` for setting `etag` header on bodies that can be buffered.
115
+ * `Rack::Events` for providing easy hooks when a request is received and when
116
+ the response is sent.
117
+ * `Rack::Files` for serving static files.
118
+ * `Rack::Head` for returning an empty body for HEAD requests.
119
+ * `Rack::Lint` for checking conformance to the [Rack Specification].
120
+ * `Rack::Lock` for serializing requests using a mutex.
121
+ * `Rack::Logger` for setting a logger to handle logging errors.
122
+ * `Rack::MethodOverride` for modifying the request method based on a submitted
123
+ parameter.
124
+ * `Rack::Recursive` for including data from other paths in the application, and
125
+ for performing internal redirects.
126
+ * `Rack::Reloader` for reloading files if they have been modified.
127
+ * `Rack::Runtime` for including a response header with the time taken to process
128
+ the request.
129
+ * `Rack::Sendfile` for working with web servers that can use optimized file
130
+ serving for file system paths.
131
+ * `Rack::ShowException` for catching unhandled exceptions and presenting them in
132
+ a nice and helpful way with clickable backtrace.
133
+ * `Rack::ShowStatus` for using nice error pages for empty client error
134
+ responses.
135
+ * `Rack::Static` for more configurable serving of static files.
136
+ * `Rack::TempfileReaper` for removing temporary files creating during a request.
137
+
138
+ All these components use the same interface, which is described in detail in the
139
+ [Rack Specification]. These optional components can be used in any way you wish.
140
+
141
+ ### Convenience interfaces
142
+
143
+ If you want to develop outside of existing frameworks, implement your own ones,
144
+ or develop middleware, Rack provides many helpers to create Rack applications
145
+ quickly and without doing the same web stuff all over:
146
+
147
+ * `Rack::Request` which also provides query string parsing and multipart
148
+ handling.
149
+ * `Rack::Response` for convenient generation of HTTP replies and cookie
150
+ handling.
151
+ * `Rack::MockRequest` and `Rack::MockResponse` for efficient and quick testing
152
+ of Rack application without real HTTP round-trips.
153
+ * `Rack::Cascade` for trying additional Rack applications if an application
154
+ returns a not found or method not supported response.
155
+ * `Rack::Directory` for serving files under a given directory, with directory
156
+ indexes.
157
+ * `Rack::MediaType` for parsing content-type headers.
158
+ * `Rack::Mime` for determining content-type based on file extension.
159
+ * `Rack::RewindableInput` for making any IO object rewindable, using a temporary
160
+ file buffer.
161
+ * `Rack::URLMap` to route to multiple applications inside the same process.
162
+
163
+ ## Configuration
164
+
165
+ Rack exposes several configuration parameters to control various features of the
166
+ implementation.
167
+
168
+ ### `param_depth_limit`
169
+
170
+ ```ruby
171
+ Rack::Utils.param_depth_limit = 32 # default
172
+ ```
173
+
174
+ The maximum amount of nesting allowed in parameters. For example, if set to 3,
175
+ this query string would be allowed:
176
+
177
+ ```
178
+ ?a[b][c]=d
179
+ ```
180
+
181
+ but this query string would not be allowed:
182
+
183
+ ```
184
+ ?a[b][c][d]=e
185
+ ```
186
+
187
+ Limiting the depth prevents a possible stack overflow when parsing parameters.
188
+
189
+ ### `multipart_part_limit`
190
+
191
+ ```ruby
192
+ Rack::Utils.multipart_part_limit = 128 # default
193
+ ```
194
+
195
+ The maximum number of parts a request can contain. Accepting too many parts can
196
+ lead to the server running out of file handles.
197
+
198
+ The default is 128, which means that a single request can't upload more than 128
199
+ files at once. Set to 0 for no limit.
200
+
201
+ Can also be set via the `RACK_MULTIPART_PART_LIMIT` environment variable.
202
+
203
+ ## Changelog
204
+
205
+ See [CHANGELOG.md](CHANGELOG.md).
206
+
207
+ ## Contributing
208
+
209
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for specific details about how to make a
210
+ contribution to Rack.
211
+
212
+ Please post bugs, suggestions and patches to [GitHub
213
+ Issues](https://github.com/rack/rack/issues).
214
+
215
+ Please check our [Security Policy](https://github.com/rack/rack/security/policy)
216
+ for responsible disclosure and security bug reporting process. Due to wide usage
217
+ of the library, it is strongly preferred that we manage timing in order to
218
+ provide viable patches at the time of disclosure. Your assistance in this matter
219
+ is greatly appreciated.
220
+
221
+ ## See Also
222
+
223
+ ### `rack-contrib`
224
+
225
+ The plethora of useful middleware created the need for a project that collects
226
+ fresh Rack middleware. `rack-contrib` includes a variety of add-on components
227
+ for Rack and it is easy to contribute new modules.
228
+
229
+ * https://github.com/rack/rack-contrib
230
+
231
+ ### `rack-session`
232
+
233
+ Provides convenient session management for Rack.
234
+
235
+ * https://github.com/rack/rack-session
236
+
237
+ ## Thanks
238
+
239
+ The Rack Core Team, consisting of
240
+
241
+ * Aaron Patterson [tenderlove](https://github.com/tenderlove)
242
+ * Samuel Williams [ioquatix](https://github.com/ioquatix)
243
+ * Jeremy Evans [jeremyevans](https://github.com/jeremyevans)
244
+ * Eileen Uchitelle [eileencodes](https://github.com/eileencodes)
245
+ * Matthew Draper [matthewd](https://github.com/matthewd)
246
+ * Rafael França [rafaelfranca](https://github.com/rafaelfranca)
247
+
248
+ and the Rack Alumni
249
+
250
+ * Ryan Tomayko [rtomayko](https://github.com/rtomayko)
251
+ * Scytrin dai Kinthra [scytrin](https://github.com/scytrin)
252
+ * Leah Neukirchen [leahneukirchen](https://github.com/leahneukirchen)
253
+ * James Tucker [raggi](https://github.com/raggi)
254
+ * Josh Peek [josh](https://github.com/josh)
255
+ * José Valim [josevalim](https://github.com/josevalim)
256
+ * Michael Fellinger [manveru](https://github.com/manveru)
257
+ * Santiago Pastorino [spastorino](https://github.com/spastorino)
258
+ * Konstantin Haase [rkh](https://github.com/rkh)
259
+
260
+ would like to thank:
261
+
262
+ * Adrian Madrid, for the LiteSpeed handler.
263
+ * Christoffer Sawicki, for the first Rails adapter and `Rack::Deflater`.
264
+ * Tim Fletcher, for the HTTP authentication code.
265
+ * Luc Heinrich for the Cookie sessions, the static file handler and bugfixes.
266
+ * Armin Ronacher, for the logo and racktools.
267
+ * Alex Beregszaszi, Alexander Kahn, Anil Wadghule, Aredridel, Ben Alpert, Dan
268
+ Kubb, Daniel Roethlisberger, Matt Todd, Tom Robinson, Phil Hagelberg, S. Brent
269
+ Faulkner, Bosko Milekic, Daniel Rodríguez Troitiño, Genki Takiuchi, Geoffrey
270
+ Grosenbach, Julien Sanchez, Kamal Fariz Mahyuddin, Masayoshi Takahashi,
271
+ Patrick Aljordm, Mig, Kazuhiro Nishiyama, Jon Bardin, Konstantin Haase, Larry
272
+ Siden, Matias Korhonen, Sam Ruby, Simon Chiang, Tim Connor, Timur Batyrshin,
273
+ and Zach Brock for bug fixing and other improvements.
274
+ * Eric Wong, Hongli Lai, Jeremy Kemper for their continuous support and API
275
+ improvements.
276
+ * Yehuda Katz and Carl Lerche for refactoring rackup.
277
+ * Brian Candler, for `Rack::ContentType`.
278
+ * Graham Batty, for improved handler loading.
279
+ * Stephen Bannasch, for bug reports and documentation.
280
+ * Gary Wright, for proposing a better `Rack::Response` interface.
281
+ * Jonathan Buch, for improvements regarding `Rack::Response`.
282
+ * Armin Röhrl, for tracking down bugs in the Cookie generator.
283
+ * Alexander Kellett for testing the Gem and reviewing the announcement.
284
+ * Marcus Rückert, for help with configuring and debugging lighttpd.
285
+ * The WSGI team for the well-done and documented work they've done and Rack
286
+ builds up on.
287
+ * All bug reporters and patch contributors not mentioned above.
288
+
289
+ ## License
290
+
291
+ Rack is released under the [MIT License](MIT-LICENSE).
292
+
293
+ [Rack Specification]: SPEC.rdoc