rack 1.6.13 → 2.0.9.3

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 (142) hide show
  1. checksums.yaml +4 -4
  2. data/COPYING +1 -1
  3. data/HISTORY.md +153 -8
  4. data/README.rdoc +35 -31
  5. data/Rakefile +6 -14
  6. data/SPEC +10 -11
  7. data/contrib/rack_logo.svg +164 -111
  8. data/example/protectedlobster.rb +1 -1
  9. data/example/protectedlobster.ru +1 -1
  10. data/lib/rack/auth/abstract/request.rb +5 -1
  11. data/lib/rack/auth/digest/params.rb +2 -3
  12. data/lib/rack/auth/digest/request.rb +1 -1
  13. data/lib/rack/body_proxy.rb +14 -9
  14. data/lib/rack/builder.rb +3 -3
  15. data/lib/rack/chunked.rb +5 -5
  16. data/lib/rack/{commonlogger.rb → common_logger.rb} +6 -3
  17. data/lib/rack/content_length.rb +2 -2
  18. data/lib/rack/deflater.rb +4 -39
  19. data/lib/rack/directory.rb +66 -54
  20. data/lib/rack/etag.rb +5 -4
  21. data/lib/rack/events.rb +154 -0
  22. data/lib/rack/file.rb +64 -40
  23. data/lib/rack/handler/cgi.rb +15 -16
  24. data/lib/rack/handler/fastcgi.rb +13 -14
  25. data/lib/rack/handler/lsws.rb +11 -11
  26. data/lib/rack/handler/scgi.rb +15 -15
  27. data/lib/rack/handler/thin.rb +3 -0
  28. data/lib/rack/handler/webrick.rb +24 -26
  29. data/lib/rack/handler.rb +3 -25
  30. data/lib/rack/head.rb +15 -17
  31. data/lib/rack/lint.rb +41 -41
  32. data/lib/rack/lobster.rb +1 -1
  33. data/lib/rack/lock.rb +15 -10
  34. data/lib/rack/logger.rb +2 -2
  35. data/lib/rack/media_type.rb +38 -0
  36. data/lib/rack/{methodoverride.rb → method_override.rb} +6 -6
  37. data/lib/rack/mime.rb +18 -5
  38. data/lib/rack/mock.rb +36 -54
  39. data/lib/rack/multipart/generator.rb +5 -5
  40. data/lib/rack/multipart/parser.rb +283 -157
  41. data/lib/rack/multipart/uploaded_file.rb +1 -2
  42. data/lib/rack/multipart.rb +36 -8
  43. data/lib/rack/{nulllogger.rb → null_logger.rb} +1 -1
  44. data/lib/rack/query_parser.rb +192 -0
  45. data/lib/rack/recursive.rb +8 -8
  46. data/lib/rack/request.rb +394 -305
  47. data/lib/rack/response.rb +130 -57
  48. data/lib/rack/rewindable_input.rb +1 -12
  49. data/lib/rack/runtime.rb +10 -18
  50. data/lib/rack/sendfile.rb +5 -7
  51. data/lib/rack/server.rb +30 -23
  52. data/lib/rack/session/abstract/id.rb +110 -75
  53. data/lib/rack/session/cookie.rb +24 -17
  54. data/lib/rack/session/memcache.rb +9 -9
  55. data/lib/rack/session/pool.rb +8 -8
  56. data/lib/rack/show_exceptions.rb +386 -0
  57. data/lib/rack/{showstatus.rb → show_status.rb} +3 -3
  58. data/lib/rack/static.rb +30 -5
  59. data/lib/rack/tempfile_reaper.rb +2 -2
  60. data/lib/rack/urlmap.rb +15 -14
  61. data/lib/rack/utils.rb +156 -217
  62. data/lib/rack.rb +70 -21
  63. data/rack.gemspec +10 -9
  64. data/test/builder/an_underscore_app.rb +5 -0
  65. data/test/builder/options.ru +1 -1
  66. data/test/cgi/test.fcgi +1 -0
  67. data/test/cgi/test.gz +0 -0
  68. data/test/helper.rb +34 -0
  69. data/test/multipart/filename_with_encoded_words +7 -0
  70. data/test/multipart/filename_with_escaped_quotes_and_modification_param +1 -1
  71. data/test/multipart/filename_with_single_quote +7 -0
  72. data/test/multipart/quoted +15 -0
  73. data/test/multipart/rack-logo.png +0 -0
  74. data/test/multipart/unity3d_wwwform +11 -0
  75. data/test/registering_handler/rack/handler/registering_myself.rb +1 -1
  76. data/test/spec_auth_basic.rb +27 -19
  77. data/test/spec_auth_digest.rb +47 -46
  78. data/test/spec_body_proxy.rb +27 -27
  79. data/test/spec_builder.rb +51 -41
  80. data/test/spec_cascade.rb +24 -22
  81. data/test/spec_cgi.rb +49 -67
  82. data/test/spec_chunked.rb +37 -35
  83. data/test/{spec_commonlogger.rb → spec_common_logger.rb} +35 -21
  84. data/test/{spec_conditionalget.rb → spec_conditional_get.rb} +29 -28
  85. data/test/spec_config.rb +3 -2
  86. data/test/spec_content_length.rb +18 -17
  87. data/test/spec_content_type.rb +13 -12
  88. data/test/spec_deflater.rb +85 -49
  89. data/test/spec_directory.rb +87 -27
  90. data/test/spec_etag.rb +32 -31
  91. data/test/spec_events.rb +133 -0
  92. data/test/spec_fastcgi.rb +50 -72
  93. data/test/spec_file.rb +120 -77
  94. data/test/spec_handler.rb +19 -34
  95. data/test/spec_head.rb +15 -14
  96. data/test/spec_lint.rb +169 -199
  97. data/test/spec_lobster.rb +24 -23
  98. data/test/spec_lock.rb +79 -39
  99. data/test/spec_logger.rb +4 -3
  100. data/test/spec_media_type.rb +42 -0
  101. data/test/{spec_methodoverride.rb → spec_method_override.rb} +34 -35
  102. data/test/spec_mime.rb +19 -19
  103. data/test/spec_mock.rb +206 -144
  104. data/test/spec_multipart.rb +329 -208
  105. data/test/{spec_nulllogger.rb → spec_null_logger.rb} +5 -4
  106. data/test/spec_recursive.rb +17 -14
  107. data/test/spec_request.rb +796 -605
  108. data/test/spec_response.rb +233 -112
  109. data/test/spec_rewindable_input.rb +50 -40
  110. data/test/spec_runtime.rb +11 -10
  111. data/test/spec_sendfile.rb +30 -35
  112. data/test/spec_server.rb +78 -52
  113. data/test/spec_session_abstract_id.rb +11 -33
  114. data/test/spec_session_abstract_session_hash.rb +45 -0
  115. data/test/spec_session_cookie.rb +99 -67
  116. data/test/spec_session_memcache.rb +67 -68
  117. data/test/spec_session_pool.rb +52 -51
  118. data/test/{spec_showexceptions.rb → spec_show_exceptions.rb} +23 -28
  119. data/test/{spec_showstatus.rb → spec_show_status.rb} +36 -35
  120. data/test/spec_static.rb +71 -32
  121. data/test/spec_tempfile_reaper.rb +11 -10
  122. data/test/spec_thin.rb +55 -50
  123. data/test/spec_urlmap.rb +79 -78
  124. data/test/spec_utils.rb +441 -346
  125. data/test/spec_version.rb +2 -8
  126. data/test/spec_webrick.rb +93 -71
  127. data/test/static/foo.html +1 -0
  128. data/test/testrequest.rb +1 -1
  129. data/test/unregistered_handler/rack/handler/unregistered.rb +1 -1
  130. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +1 -1
  131. metadata +95 -74
  132. data/KNOWN-ISSUES +0 -44
  133. data/lib/rack/backports/uri/common_18.rb +0 -56
  134. data/lib/rack/backports/uri/common_192.rb +0 -52
  135. data/lib/rack/backports/uri/common_193.rb +0 -29
  136. data/lib/rack/handler/evented_mongrel.rb +0 -8
  137. data/lib/rack/handler/mongrel.rb +0 -106
  138. data/lib/rack/handler/swiftiplied_mongrel.rb +0 -8
  139. data/lib/rack/showexceptions.rb +0 -387
  140. data/lib/rack/utils/okjson.rb +0 -600
  141. data/test/spec_mongrel.rb +0 -182
  142. /data/lib/rack/{conditionalget.rb → conditional_get.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1284c246863ad0e0c1472c12dc028993a5c84223a53deb943183f396c21f05ec
4
- data.tar.gz: 6aba4634a7f953dff80b391f999eae11404516f22158d6b2931f8fc7d65aa02b
3
+ metadata.gz: 60eb430d14b80b4cc729d7a97bdf1a56196fa854ff5bd0a23f4fd21ecabd92ec
4
+ data.tar.gz: 373f537c5b38c9cf1f307dcc8876ff52e4dc67235bfcd554a0f6e35c854ee4c0
5
5
  SHA512:
6
- metadata.gz: 81f24112cf528aa9f672dede1598fe9527a7d3aa5578e11fe6d6064a96d3091f0afae7f9d4bf453f1eff8c9a3d2ce4bb57991e5a45d41abfdc1948a62c8f65e2
7
- data.tar.gz: bfde816a21a1293b1b8be7e7f3fd583887e854c57c96afc2d9b823cf16eb40938ef563294bb323389ab241322cfd3add5503e69e3e0ce8678739988d4990e43d
6
+ metadata.gz: d8d221546080d35fe8e9e4eb0810b02d0996b912874c408a7a5d270d6e26453430f0f05108ba41d8de40088b882db1de9f1efcac4e6b7e63a01431b6e4bd5f09
7
+ data.tar.gz: f4ba080150f27b7d2ffb4babc9707c0e539a7464bb4377df192122d8484158d188be57474ba9b5af3f72eaebb7257977f2ad43ba7effe3068decccba84caa0ea
data/COPYING CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2015 Christian Neukirchen <purl.org/net/chneukirchen>
1
+ Copyright (c) 2007-2016 Christian Neukirchen <purl.org/net/chneukirchen>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to
data/HISTORY.md CHANGED
@@ -1,3 +1,18 @@
1
+ Thu Mar 2 14:50:46 2023 Aaron Patterson <tenderlove@ruby-lang.org>
2
+
3
+ * [CVE-2023-27530] Introduce multipart_total_part_limit to limit total parts
4
+
5
+ Tue Jan 17 12:27:04 2023 Aaron Patterson <tenderlove@ruby-lang.org>
6
+
7
+ * [CVE-2022-44571] Fix ReDoS vulnerability in multipart parser
8
+ * [CVE-2022-44570] Fix ReDoS in Rack::Utils.get_byte_ranges
9
+ * [CVE-2022-44572] Forbid control characters in attributes (also ReDoS)
10
+
11
+ Fri May 27 08:27:04 2022 Aaron Patterson <tenderlove@ruby-lang.org>
12
+
13
+ * [CVE-2022-30123] Fix shell escaping issue in Common Logger
14
+ * [CVE-2022-30122] Restrict parsing of broken MIME attachments
15
+
1
16
  Sun Dec 4 18:48:03 2015 Jeremy Daer <jeremydaer@gmail.com>
2
17
 
3
18
  * First-party "SameSite" cookies. Browsers omit SameSite cookies
@@ -14,21 +29,149 @@ Sun Dec 4 18:48:03 2015 Jeremy Daer <jeremydaer@gmail.com>
14
29
  Thanks to Ben Toews (@mastahyeti) and Bob Long (@bobjflong) for
15
30
  updating to drafts 5 and 7.
16
31
 
17
- Wed Jun 24 12:13:37 2015 Aaron Patterson <tenderlove@ruby-lang.org>
32
+ Tue Nov 3 16:17:26 2015 Aaron Patterson <tenderlove@ruby-lang.org>
33
+
34
+ * Add `Rack::Events` middleware for adding event based middleware:
35
+ middleware that does not care about the response body, but only cares
36
+ about doing work at particular points in the request / response
37
+ lifecycle.
38
+
39
+ Thu Oct 8 14:58:46 2015 Aaron Patterson <tenderlove@ruby-lang.org>
40
+
41
+ * Add `Rack::Request#authority` to calculate the authority under which
42
+ the response is being made (this will be handy for h2 pushes).
43
+
44
+ Tue Oct 6 13:19:04 2015 Aaron Patterson <tenderlove@ruby-lang.org>
45
+
46
+ * Add `Rack::Response::Helpers#cache_control` and `cache_control=`.
47
+ Use this for setting cache control headers on your response objects.
48
+
49
+ Tue Oct 6 13:12:21 2015 Aaron Patterson <tenderlove@ruby-lang.org>
50
+
51
+ * Add `Rack::Response::Helpers#etag` and `etag=`. Use this for
52
+ setting etag values on the response.
53
+
54
+ Sun Oct 3 18:25:03 2015 Jeremy Daer <jeremydaer@gmail.com>
55
+
56
+ * Introduce `Rack::Response::Helpers#add_header` to add a value to a
57
+ multi-valued response header. Implemented in terms of other
58
+ `Response#*_header` methods, so it's available to any response-like
59
+ class that includes the `Helpers` module.
60
+
61
+ * Add `Rack::Request#add_header` to match.
62
+
63
+ Fri Sep 4 18:34:53 2015 Aaron Patterson <tenderlove@ruby-lang.org>
64
+
65
+ * `Rack::Session::Abstract::ID` IS DEPRECATED. Please switch to
66
+ `Rack::Session::Abstract::Persisted`.
67
+ `Rack::Session::Abstract::Persisted` uses a request object rather than
68
+ the `env` hash.
69
+
70
+ Fri Sep 4 17:32:12 2015 Aaron Patterson <tenderlove@ruby-lang.org>
71
+
72
+ * Pull `ENV` access inside the request object in to a module. This
73
+ will help with legacy Request objects that are ENV based but don't
74
+ want to inherit from Rack::Request
18
75
 
19
- * Fix Ruby 1.8 backwards compatibility
76
+ Fri Sep 4 16:09:11 2015 Aaron Patterson <tenderlove@ruby-lang.org>
20
77
 
21
- Fri Jun 19 07:14:50 2015 Matthew Draper <matthew@trebex.net>
78
+ * Move most methods on the `Rack::Request` to a module
79
+ `Rack::Request::Helpers` and use public API to get values from the
80
+ request object. This enables users to mix `Rack::Request::Helpers` in
81
+ to their own objects so they can implement
82
+ `(get|set|fetch|each)_header` as they see fit (for example a proxy
83
+ object).
22
84
 
23
- * Work around a Rails incompatibility in our private API
85
+ Fri Sep 4 14:15:32 2015 Aaron Patterson <tenderlove@ruby-lang.org>
86
+
87
+ * Files and directories with + in the name are served correctly.
88
+ Rather than unescaping paths like a form, we unescape with a URI
89
+ parser using `Rack::Utils.unescape_path`. Fixes #265
90
+
91
+ Thu Aug 27 15:43:48 2015 Aaron Patterson <tenderlove@ruby-lang.org>
92
+
93
+ * Tempfiles are automatically closed in the case that there were too
94
+ many posted.
95
+
96
+ Thu Aug 27 11:00:03 2015 Aaron Patterson <tenderlove@ruby-lang.org>
97
+
98
+ * Added methods for manipulating response headers that don't assume
99
+ they're stored as a Hash. Response-like classes may include the
100
+ Rack::Response::Helpers module if they define these methods:
101
+
102
+ * Rack::Response#has_header?
103
+ * Rack::Response#get_header
104
+ * Rack::Response#set_header
105
+ * Rack::Response#delete_header
106
+
107
+ Mon Aug 24 18:05:23 2015 Aaron Patterson <tenderlove@ruby-lang.org>
108
+
109
+ * Introduce Util.get_byte_ranges that will parse the value of the
110
+ HTTP_RANGE string passed to it without depending on the `env` hash.
111
+ `byte_ranges` is deprecated in favor of this method.
112
+
113
+ Sat Aug 22 17:49:49 2015 Aaron Patterson <tenderlove@ruby-lang.org>
114
+
115
+ * Change Session internals to use Request objects for looking up
116
+ session information. This allows us to only allocate one request
117
+ object when dealing with session objects (rather than doing it every
118
+ time we need to manipulate cookies, etc).
119
+
120
+ Fri Aug 21 16:30:51 2015 Aaron Patterson <tenderlove@ruby-lang.org>
121
+
122
+ * Add `Rack::Request#initialize_copy` so that the env is duped when
123
+ the request gets duped.
124
+
125
+ Thu Aug 20 16:20:58 2015 Aaron Patterson <tenderlove@ruby-lang.org>
126
+
127
+ * Added methods for manipulating request specific data. This includes
128
+ data set as CGI parameters, and just any arbitrary data the user wants
129
+ to associate with a particular request. New methods:
130
+
131
+ * Rack::Request#has_header?
132
+ * Rack::Request#get_header
133
+ * Rack::Request#fetch_header
134
+ * Rack::Request#each_header
135
+ * Rack::Request#set_header
136
+ * Rack::Request#delete_header
137
+
138
+ Thu Jun 18 16:00:05 2015 Aaron Patterson <tenderlove@ruby-lang.org>
139
+
140
+ * lib/rack/utils.rb: add a method for constructing "delete" cookie
141
+ headers. This allows us to construct cookie headers without depending
142
+ on the side effects of mutating a hash.
24
143
 
25
144
  Fri Jun 12 11:37:41 2015 Aaron Patterson <tenderlove@ruby-lang.org>
26
145
 
27
146
  * Prevent extremely deep parameters from being parsed. CVE-2015-3225
28
147
 
29
- ### December 18th, Thirty sixth public release 1.6.0
30
-
31
- ### February 7th, Thirty fifth public release 1.5.2
148
+ ### May 6th, 2015, Thirty seventh public release 1.6.1
149
+ - Fix CVE-2014-9490, denial of service attack in OkJson ([8cd610](https://github.com/rack/rack/commit/8cd61062954f70e0a03e2855704e95ff4bdd4f6e))
150
+ - Use a monotonic time for Rack::Runtime, if available ([d170b2](https://github.com/rack/rack/commit/d170b2363c949dce60871f9d5a6bfc83da2bedb5))
151
+ - RACK_MULTIPART_LIMIT changed to RACK_MULTIPART_PART_LIMIT (RACK_MULTIPART_LIMIT is deprecated and will be removed in 1.7.0) ([c096c5](https://github.com/rack/rack/commit/c096c50c00230d8eee13ad5f79ad027d9a3f3ca9))
152
+ - See the full [git history](https://github.com/rack/rack/compare/1.6.0...1.6.1) and [milestone tag](https://github.com/rack/rack/issues?utf8=%E2%9C%93&q=milestone%3A%22Rack+1.6%22)
153
+
154
+ ### May 6th, 2015, Thirty seventh public release 1.5.3
155
+ - Fix CVE-2014-9490, denial of service attack in OkJson ([99f725](https://github.com/rack/rack/commit/99f725b583b357376ffbb7b3b042c5daa3106ad6))
156
+ - Backport bug fixes to 1.5 series ([#585](https://github.com/rack/rack/pull/585), [#711](https://github.com/rack/rack/pull/711), [#756](https://github.com/rack/rack/pull/756))
157
+ - See the full [git history](https://github.com/rack/rack/compare/1.5.2...1.5.3) and [milestone tag](https://github.com/rack/rack/issues?utf8=%E2%9C%93&q=milestone%3A%22Rack+1.5.3%22)
158
+
159
+ ### December 18th, 2014, Thirty sixth public release 1.6.0
160
+ - Response#unauthorized? helper ([#580](https://github.com/rack/rack/pull/580))
161
+ - Deflater now accepts an options hash to control compression on a per-request level ([#457](https://github.com/rack/rack/pull/457))
162
+ - Builder#warmup method for app preloading ([#617](https://github.com/rack/rack/pull/617))
163
+ - Request#accept_language method to extract HTTP_ACCEPT_LANGUAGE ([#623](https://github.com/rack/rack/pull/623))
164
+ - Add quiet mode of rack server, rackup --quiet ([#674](https://github.com/rack/rack/pull/674))
165
+ - Update HTTP Status Codes to RFC 7231 ([#754](https://github.com/rack/rack/pull/754))
166
+ - Less strict header name validation according to [RFC 2616](https://tools.ietf.org/html/rfc2616) ([#399](https://github.com/rack/rack/pull/399))
167
+ - SPEC updated to specify headers conform to RFC7230 specification ([6839fc](https://github.com/rack/rack/commit/6839fc203339f021cb3267fb09cba89410f086e9))
168
+ - Etag correctly marks etags as weak ([#681](https://github.com/rack/rack/issues/681))
169
+ - Request#port supports multiple x-http-forwarded-proto values ([#669](https://github.com/rack/rack/pull/669))
170
+ - Utils#multipart_part_limit configures the maximum number of parts a request can contain ([#684](https://github.com/rack/rack/pull/684))
171
+ - Default host to localhost when in development mode ([#514](https://github.com/rack/rack/pull/514))
172
+ - Various bugfixes and performance improvements (See the full [git history](https://github.com/rack/rack/compare/1.5.2...1.6.0) and [milestone tag](https://github.com/rack/rack/issues?utf8=%E2%9C%93&q=milestone%3A%22Rack+1.6%22))
173
+
174
+ ### February 7th, 2013, Thirty fifth public release 1.5.2
32
175
  - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
33
176
  - Fix CVE-2013-0262, symlink path traversal in Rack::File
34
177
  - Add various methods to Session for enhanced Rails compatibility
@@ -38,7 +181,7 @@ Fri Jun 12 11:37:41 2015 Aaron Patterson <tenderlove@ruby-lang.org>
38
181
  - Fix a race condition that could result in overwritten pidfiles
39
182
  - Various documentation additions
40
183
 
41
- ### February 7th, Thirty fifth public release 1.4.5
184
+ ### February 7th, 2013, Thirty fifth public release 1.4.5
42
185
  - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
43
186
  - Fix CVE-2013-0262, symlink path traversal in Rack::File
44
187
 
@@ -373,3 +516,5 @@ Fri Jun 12 11:37:41 2015 Aaron Patterson <tenderlove@ruby-lang.org>
373
516
  - Removed Rails adapter, was too alpha.
374
517
 
375
518
  ### March 3rd, 2007: First public release 0.1.
519
+
520
+ /* vim: set filetype=changelog */
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Rack, a modular Ruby webserver interface {<img src="https://secure.travis-ci.org/rack/rack.svg" alt="Build Status" />}[http://travis-ci.org/rack/rack] {<img src="https://gemnasium.com/rack/rack.svg" alt="Dependency Status" />}[https://gemnasium.com/rack/rack]
2
2
 
3
- Rack provides a minimal, modular and adaptable interface for developing
3
+ Rack provides a minimal, modular, and adaptable interface for developing
4
4
  web applications in Ruby. By wrapping HTTP requests and responses in
5
5
  the simplest way possible, it unifies and distills the API for web
6
6
  servers, web frameworks, and software in between (the so-called
@@ -12,9 +12,6 @@ which all Rack applications should conform to.
12
12
  == Supported web servers
13
13
 
14
14
  The included *handlers* connect all kinds of web servers to Rack:
15
- * Mongrel
16
- * EventedMongrel
17
- * SwiftipliedMongrel
18
15
  * WEBrick
19
16
  * FCGI
20
17
  * CGI
@@ -28,13 +25,11 @@ These web servers include Rack handlers in their distributions:
28
25
  * Glassfish v3
29
26
  * Phusion Passenger (which is mod_rack for Apache and for nginx)
30
27
  * Puma
31
- * Rainbows!
32
28
  * Reel
33
29
  * Unicorn
34
30
  * unixrack
35
31
  * uWSGI
36
32
  * yahns
37
- * Zbatery
38
33
 
39
34
  Any valid Rack app will run the same on all these handlers, without
40
35
  changing anything.
@@ -103,8 +98,8 @@ Rack::Builder DSL to configure middleware and build up applications
103
98
  easily.
104
99
 
105
100
  rackup automatically figures out the environment it is run in, and
106
- runs your application as FastCGI, CGI, or standalone with Mongrel or
107
- WEBrick---all from the same configuration.
101
+ runs your application as FastCGI, CGI, or WEBrick---all from the
102
+ same configuration.
108
103
 
109
104
  == Quick start
110
105
 
@@ -141,19 +136,17 @@ Or:
141
136
 
142
137
  bundle install # this assumes that you have installed native extensions!
143
138
 
144
- There are two rake-based test tasks:
139
+ There is a rake-based test task:
145
140
 
146
- rake test tests all the fast tests (no Handlers or Adapters)
147
- rake fulltest runs all the tests
141
+ rake test tests all the tests
148
142
 
149
- The fast testsuite has no dependencies outside of the core Ruby
143
+ The testsuite has no dependencies outside of the core Ruby
150
144
  installation and bacon.
151
145
 
152
146
  To run the test suite completely, you need:
153
147
 
154
148
  * fcgi
155
149
  * memcache-client
156
- * mongrel
157
150
  * thin
158
151
 
159
152
  The full set of tests test FCGI access with lighttpd (on port
@@ -196,20 +189,34 @@ This helps prevent a rogue client from flooding a Request.
196
189
 
197
190
  Default to 65536 characters (4 kiB in worst case).
198
191
 
199
- === multipart_part_limit
192
+ === multipart_file_limit
200
193
 
201
- The maximum number of parts a request can contain.
194
+ The maximum number of parts with a filename a request can contain.
202
195
  Accepting too many part can lead to the server running out of file handles.
203
196
 
204
197
  The default is 128, which means that a single request can't upload more than 128 files at once.
205
198
 
206
199
  Set to 0 for no limit.
207
200
 
208
- Can also be set via the RACK_MULTIPART_PART_LIMIT environment variable.
201
+ Can also be set via the +RACK_MULTIPART_FILE_LIMIT+ environment variable.
202
+
203
+ (This is also aliased as +multipart_part_limit+ and +RACK_MULTIPART_PART_LIMIT+ for compatibility)
204
+
205
+ === multipart_total_part_limit
206
+
207
+ The maximum total number of parts a request can contain of any type, including
208
+ both file and non-file form fields.
209
+
210
+ The default is 4096, which means that a single request can't contain more than
211
+ 4096 parts.
212
+
213
+ Set to 0 for no limit.
214
+
215
+ Can also be set via the +RACK_MULTIPART_TOTAL_PART_LIMIT+ environment variable.
209
216
 
210
217
  == History
211
218
 
212
- See <https://github.com/rack/HISTORY.md>.
219
+ See <https://github.com/rack/rack/blob/master/HISTORY.md>.
213
220
 
214
221
  == Contact
215
222
 
@@ -235,19 +242,19 @@ You are also welcome to join the #rack channel on irc.freenode.net.
235
242
 
236
243
  The Rack Core Team, consisting of
237
244
 
238
- * Christian Neukirchen (chneukirchen)
239
- * James Tucker (raggi)
240
- * Josh Peek (josh)
241
- * José Valim (josevalim)
242
- * Michael Fellinger (manveru)
243
- * Aaron Patterson (tenderlove)
244
- * Santiago Pastorino (spastorino)
245
- * Konstantin Haase (rkh)
245
+ * Leah Neukirchen (chneukirchen[https://github.com/chneukirchen])
246
+ * James Tucker (raggi[https://github.com/raggi])
247
+ * Josh Peek (josh[https://github.com/josh])
248
+ * José Valim (josevalim[https://github.com/josevalim])
249
+ * Michael Fellinger (manveru[https://github.com/manveru])
250
+ * Aaron Patterson (tenderlove[https://github.com/tenderlove])
251
+ * Santiago Pastorino (spastorino[https://github.com/spastorino])
252
+ * Konstantin Haase (rkh[https://github.com/rkh])
246
253
 
247
254
  and the Rack Alumnis
248
255
 
249
- * Ryan Tomayko (rtomayko)
250
- * Scytrin dai Kinthra (scytrin)
256
+ * Ryan Tomayko (rtomayko[https://github.com/rtomayko])
257
+ * Scytrin dai Kinthra (scytrin[https://github.com/scytrin])
251
258
 
252
259
  would like to thank:
253
260
 
@@ -302,11 +309,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
302
309
 
303
310
  == Links
304
311
 
305
- Rack:: <http://rack.github.io/>
312
+ Rack:: <https://rack.github.io/>
306
313
  Official Rack repositories:: <https://github.com/rack>
307
314
  Rack Bug Tracking:: <https://github.com/rack/rack/issues>
308
315
  rack-devel mailing list:: <https://groups.google.com/group/rack-devel>
309
316
  Rack's Rubyforge project:: <http://rubyforge.org/projects/rack>
310
-
311
- Christian Neukirchen:: <http://chneukirchen.org/>
312
-
data/Rakefile CHANGED
@@ -36,7 +36,7 @@ task :officialrelease_really => %w[SPEC dist gem] do
36
36
  end
37
37
 
38
38
  def release
39
- "rack-#{File.read("rack.gemspec")[/s.version *= *"(.*?)"/, 1]}"
39
+ "rack-" + File.read('lib/rack.rb')[/RELEASE += +([\"\'])([\d][\w\.]+)\1/, 2]
40
40
  end
41
41
 
42
42
  desc "Make binaries executable"
@@ -52,7 +52,7 @@ file '.git/index'
52
52
  file "ChangeLog" => '.git/index' do
53
53
  File.open("ChangeLog", "w") { |out|
54
54
  log = `git log -z`
55
- log.force_encoding(Encoding::BINARY) if log.respond_to?(:force_encoding)
55
+ log.force_encoding(Encoding::BINARY)
56
56
  log.split("\0").map { |chunk|
57
57
  author = chunk[/Author: (.*)/, 1].strip
58
58
  date = chunk[/Date: (.*)/, 1].strip
@@ -82,22 +82,14 @@ end
82
82
 
83
83
  desc "Run all the fast + platform agnostic tests"
84
84
  task :test => 'SPEC' do
85
- opts = ENV['TEST'] || '-a'
86
- specopts = ENV['TESTOPTS'] ||
87
- "-q -t '^(?!Rack::Adapter|Rack::Session::Memcache|Rack::Server|Rack::Handler)'"
85
+ opts = ENV['TEST'] || ''
86
+ specopts = ENV['TESTOPTS']
88
87
 
89
- sh "bacon -w -I./lib:./test #{opts} #{specopts}"
88
+ sh "ruby -I./lib:./test -S minitest #{opts} #{specopts} test/gemloader.rb test/spec*.rb"
90
89
  end
91
90
 
92
91
  desc "Run all the tests we run on CI"
93
- task :ci => :fulltest
94
-
95
- desc "Run all the tests"
96
- task :fulltest => %w[SPEC chmod] do
97
- opts = ENV['TEST'] || '-a'
98
- specopts = ENV['TESTOPTS'] || '-q'
99
- sh "bacon -r./test/gemloader -I./lib:./test -w #{opts} #{specopts}"
100
- end
92
+ task :ci => :test
101
93
 
102
94
  task :gem => ["SPEC"] do
103
95
  sh "gem build rack.gemspec"
data/SPEC CHANGED
@@ -35,7 +35,7 @@ below.
35
35
  empty string, if the request URL targets
36
36
  the application root and does not have a
37
37
  trailing slash. This value may be
38
- percent-encoded when I originating from
38
+ percent-encoded when originating from
39
39
  a URL.
40
40
  <tt>QUERY_STRING</tt>:: The portion of the request URL that
41
41
  follows the <tt>?</tt>, if any. May be
@@ -60,8 +60,8 @@ below.
60
60
  the presence or absence of the
61
61
  appropriate HTTP header in the
62
62
  request. See
63
- <a href="https://tools.ietf.org/html/rfc3875#section-4.1.18">
64
- RFC3875 section 4.1.18</a> for
63
+ {https://tools.ietf.org/html/rfc3875#section-4.1.18
64
+ RFC3875 section 4.1.18} for
65
65
  specific behavior.
66
66
  In addition to this, the Rack environment must include these
67
67
  Rack-specific variables:
@@ -98,13 +98,12 @@ Rack-specific variables:
98
98
  Additional environment specifications have approved to
99
99
  standardized middleware APIs. None of these are required to
100
100
  be implemented by the server.
101
- <tt>rack.session</tt>:: A hash like interface for storing
102
- request session data.
101
+ <tt>rack.session</tt>:: A hash like interface for storing request session data.
103
102
  The store must implement:
104
- store(key, value) (aliased as []=);
105
- fetch(key, default = nil) (aliased as []);
106
- delete(key);
107
- clear;
103
+ store(key, value) (aliased as []=);
104
+ fetch(key, default = nil) (aliased as []);
105
+ delete(key);
106
+ clear;
108
107
  <tt>rack.logger</tt>:: A common object interface for logging messages.
109
108
  The object must implement:
110
109
  info(message, &block)
@@ -238,10 +237,10 @@ consisting of lines (for multiple header values, e.g. multiple
238
237
  The lines must not contain characters below 037.
239
238
  === The Content-Type
240
239
  There must not be a <tt>Content-Type</tt>, when the +Status+ is 1xx,
241
- 204, 205 or 304.
240
+ 204 or 304.
242
241
  === The Content-Length
243
242
  There must not be a <tt>Content-Length</tt> header when the
244
- +Status+ is 1xx, 204, 205 or 304.
243
+ +Status+ is 1xx, 204 or 304.
245
244
  === The Body
246
245
  The Body must respond to +each+
247
246
  and must only yield String values.