rack 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rack might be problematic. Click here for more details.
- data/README +5 -0
- data/lib/rack/handler/cgi.rb +2 -1
- data/lib/rack/utils.rb +10 -5
- data/rack.gemspec +3 -3
- data/{spec → test}/cgi/lighttpd.conf +0 -0
- data/{spec → test}/cgi/rackup_stub.rb +0 -0
- data/{spec → test}/cgi/sample_rackup.ru +0 -0
- data/{spec → test}/cgi/test +0 -0
- data/{spec → test}/cgi/test.fcgi +0 -0
- data/{spec → test}/cgi/test.ru +0 -0
- data/{spec → test}/multipart/bad_robots +0 -0
- data/{spec → test}/multipart/binary +0 -0
- data/{spec → test}/multipart/empty +0 -0
- data/{spec → test}/multipart/fail_16384_nofile +0 -0
- data/{spec → test}/multipart/file1.txt +0 -0
- data/{spec → test}/multipart/filename_and_modification_param +0 -0
- data/{spec → test}/multipart/filename_with_escaped_quotes +0 -0
- data/{spec → test}/multipart/filename_with_escaped_quotes_and_modification_param +0 -0
- data/{spec → test}/multipart/filename_with_percent_escaped_quotes +0 -0
- data/{spec → test}/multipart/filename_with_unescaped_quotes +0 -0
- data/{spec → test}/multipart/ie +0 -0
- data/{spec → test}/multipart/nested +0 -0
- data/{spec → test}/multipart/none +0 -0
- data/{spec → test}/multipart/semicolon +0 -0
- data/{spec → test}/multipart/text +0 -0
- data/{spec → test}/rackup/config.ru +0 -0
- data/{spec → test}/spec_auth_basic.rb +0 -0
- data/{spec → test}/spec_auth_digest.rb +0 -0
- data/{spec → test}/spec_builder.rb +0 -0
- data/{spec → test}/spec_cascade.rb +0 -0
- data/{spec → test}/spec_cgi.rb +0 -0
- data/{spec → test}/spec_chunked.rb +0 -0
- data/{spec → test}/spec_commonlogger.rb +0 -0
- data/{spec → test}/spec_conditionalget.rb +0 -0
- data/{spec → test}/spec_config.rb +0 -0
- data/{spec → test}/spec_content_length.rb +0 -0
- data/{spec → test}/spec_content_type.rb +0 -0
- data/{spec → test}/spec_deflater.rb +0 -0
- data/{spec → test}/spec_directory.rb +0 -0
- data/{spec → test}/spec_etag.rb +0 -0
- data/{spec → test}/spec_fastcgi.rb +0 -0
- data/{spec → test}/spec_file.rb +0 -0
- data/{spec → test}/spec_handler.rb +0 -0
- data/{spec → test}/spec_head.rb +0 -0
- data/{spec → test}/spec_lint.rb +0 -0
- data/{spec → test}/spec_lobster.rb +0 -0
- data/{spec → test}/spec_lock.rb +0 -0
- data/{spec → test}/spec_logger.rb +0 -0
- data/{spec → test}/spec_methodoverride.rb +0 -0
- data/{spec → test}/spec_mock.rb +0 -0
- data/{spec → test}/spec_mongrel.rb +0 -0
- data/{spec → test}/spec_nulllogger.rb +0 -0
- data/{spec → test}/spec_recursive.rb +0 -0
- data/{spec → test}/spec_request.rb +0 -0
- data/{spec → test}/spec_response.rb +0 -0
- data/{spec → test}/spec_rewindable_input.rb +0 -0
- data/{spec → test}/spec_runtime.rb +0 -0
- data/{spec → test}/spec_sendfile.rb +0 -0
- data/{spec → test}/spec_session_cookie.rb +0 -0
- data/{spec → test}/spec_session_memcache.rb +0 -0
- data/{spec → test}/spec_session_pool.rb +0 -0
- data/{spec → test}/spec_showexceptions.rb +0 -0
- data/{spec → test}/spec_showstatus.rb +0 -0
- data/{spec → test}/spec_static.rb +0 -0
- data/{spec → test}/spec_thin.rb +0 -0
- data/{spec → test}/spec_urlmap.rb +0 -0
- data/{spec → test}/spec_utils.rb +0 -0
- data/{spec → test}/spec_webrick.rb +0 -0
- data/{spec → test}/testrequest.rb +0 -0
- data/{spec → test}/unregistered_handler/rack/handler/unregistered.rb +0 -0
- data/{spec → test}/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -0
- metadata +112 -112
data/README
CHANGED
@@ -308,6 +308,11 @@ run on port 11211) and memcache-client installed.
|
|
308
308
|
* Various multipart fixes
|
309
309
|
* Switch test suite to bacon
|
310
310
|
|
311
|
+
* June 15th, 2010: Eleventh public release 1.2.1.
|
312
|
+
* Make CGI handler rewindable
|
313
|
+
* Rename spec/ to test/ to not conflict with SPEC on lesser
|
314
|
+
operating systems
|
315
|
+
|
311
316
|
== Contact
|
312
317
|
|
313
318
|
Please post bugs, suggestions and patches to
|
data/lib/rack/handler/cgi.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rack/content_length'
|
2
|
+
require 'rack/rewindable_input'
|
2
3
|
|
3
4
|
module Rack
|
4
5
|
module Handler
|
@@ -17,7 +18,7 @@ module Rack
|
|
17
18
|
env["SCRIPT_NAME"] = "" if env["SCRIPT_NAME"] == "/"
|
18
19
|
|
19
20
|
env.update({"rack.version" => Rack::VERSION,
|
20
|
-
"rack.input" => $stdin,
|
21
|
+
"rack.input" => Rack::RewindableInput.new($stdin),
|
21
22
|
"rack.errors" => $stderr,
|
22
23
|
|
23
24
|
"rack.multithread" => false,
|
data/lib/rack/utils.rb
CHANGED
@@ -128,13 +128,18 @@ module Rack
|
|
128
128
|
end
|
129
129
|
module_function :build_nested_query
|
130
130
|
|
131
|
+
ESCAPE_HTML = {
|
132
|
+
"&" => "&",
|
133
|
+
"<" => "<",
|
134
|
+
">" => ">",
|
135
|
+
"'" => "'",
|
136
|
+
'"' => """,
|
137
|
+
}
|
138
|
+
ESCAPE_HTML_PATTERN = Regexp.union(ESCAPE_HTML.keys)
|
139
|
+
|
131
140
|
# Escape ampersands, brackets and quotes to their HTML/XML entities.
|
132
141
|
def escape_html(string)
|
133
|
-
string.to_s.gsub(
|
134
|
-
gsub("<", "<").
|
135
|
-
gsub(">", ">").
|
136
|
-
gsub("'", "'").
|
137
|
-
gsub('"', """)
|
142
|
+
string.to_s.gsub(ESCAPE_HTML_PATTERN){|c| ESCAPE_HTML[c] }
|
138
143
|
end
|
139
144
|
module_function :escape_html
|
140
145
|
|
data/rack.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "rack"
|
3
|
-
s.version = "1.2.
|
3
|
+
s.version = "1.2.1"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "a modular Ruby webserver interface"
|
6
6
|
|
@@ -14,14 +14,14 @@ middleware) into a single method call.
|
|
14
14
|
Also see http://rack.rubyforge.org.
|
15
15
|
EOF
|
16
16
|
|
17
|
-
s.files = Dir['{bin/*,contrib/*,example/*,lib/**/*,
|
17
|
+
s.files = Dir['{bin/*,contrib/*,example/*,lib/**/*,test/**/*}'] +
|
18
18
|
%w(COPYING KNOWN-ISSUES rack.gemspec README SPEC)
|
19
19
|
s.bindir = 'bin'
|
20
20
|
s.executables << 'rackup'
|
21
21
|
s.require_path = 'lib'
|
22
22
|
s.has_rdoc = true
|
23
23
|
s.extra_rdoc_files = ['README', 'SPEC', 'KNOWN-ISSUES']
|
24
|
-
s.test_files = Dir['
|
24
|
+
s.test_files = Dir['test/spec_*.rb']
|
25
25
|
|
26
26
|
s.author = 'Christian Neukirchen'
|
27
27
|
s.email = 'chneukirchen@gmail.com'
|
File without changes
|
File without changes
|
File without changes
|
data/{spec → test}/cgi/test
RENAMED
File without changes
|
data/{spec → test}/cgi/test.fcgi
RENAMED
File without changes
|
data/{spec → test}/cgi/test.ru
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{spec → test}/multipart/ie
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{spec → test}/spec_cgi.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{spec → test}/spec_etag.rb
RENAMED
File without changes
|
File without changes
|
data/{spec → test}/spec_file.rb
RENAMED
File without changes
|
File without changes
|
data/{spec → test}/spec_head.rb
RENAMED
File without changes
|
data/{spec → test}/spec_lint.rb
RENAMED
File without changes
|
File without changes
|
data/{spec → test}/spec_lock.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/{spec → test}/spec_mock.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{spec → test}/spec_thin.rb
RENAMED
File without changes
|
File without changes
|
data/{spec → test}/spec_utils.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 1
|
9
|
+
version: 1.2.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Christian Neukirchen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-15 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -169,73 +169,73 @@ files:
|
|
169
169
|
- lib/rack/mime.rb
|
170
170
|
- lib/rack/reloader.rb
|
171
171
|
- lib/rack.rb
|
172
|
-
-
|
173
|
-
-
|
174
|
-
-
|
175
|
-
-
|
176
|
-
-
|
177
|
-
-
|
178
|
-
-
|
179
|
-
-
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
188
|
-
-
|
189
|
-
-
|
190
|
-
-
|
191
|
-
-
|
192
|
-
-
|
193
|
-
-
|
194
|
-
-
|
195
|
-
-
|
196
|
-
-
|
197
|
-
-
|
198
|
-
-
|
199
|
-
-
|
200
|
-
-
|
201
|
-
-
|
202
|
-
-
|
203
|
-
-
|
204
|
-
-
|
205
|
-
-
|
206
|
-
-
|
207
|
-
-
|
208
|
-
-
|
209
|
-
-
|
210
|
-
-
|
211
|
-
-
|
212
|
-
-
|
213
|
-
-
|
214
|
-
-
|
215
|
-
-
|
216
|
-
-
|
217
|
-
-
|
218
|
-
-
|
219
|
-
-
|
220
|
-
-
|
221
|
-
-
|
222
|
-
-
|
223
|
-
-
|
224
|
-
-
|
225
|
-
-
|
226
|
-
-
|
227
|
-
-
|
228
|
-
-
|
229
|
-
-
|
230
|
-
-
|
231
|
-
-
|
232
|
-
-
|
233
|
-
-
|
234
|
-
-
|
235
|
-
-
|
236
|
-
-
|
237
|
-
-
|
238
|
-
-
|
172
|
+
- test/spec_static.rb
|
173
|
+
- test/spec_content_type.rb
|
174
|
+
- test/spec_thin.rb
|
175
|
+
- test/testrequest.rb
|
176
|
+
- test/spec_auth_digest.rb
|
177
|
+
- test/spec_response.rb
|
178
|
+
- test/spec_file.rb
|
179
|
+
- test/spec_rewindable_input.rb
|
180
|
+
- test/spec_methodoverride.rb
|
181
|
+
- test/spec_fastcgi.rb
|
182
|
+
- test/spec_chunked.rb
|
183
|
+
- test/spec_cgi.rb
|
184
|
+
- test/multipart/semicolon
|
185
|
+
- test/multipart/filename_with_escaped_quotes
|
186
|
+
- test/multipart/binary
|
187
|
+
- test/multipart/fail_16384_nofile
|
188
|
+
- test/multipart/filename_and_modification_param
|
189
|
+
- test/multipart/text
|
190
|
+
- test/multipart/ie
|
191
|
+
- test/multipart/filename_with_percent_escaped_quotes
|
192
|
+
- test/multipart/empty
|
193
|
+
- test/multipart/none
|
194
|
+
- test/multipart/file1.txt
|
195
|
+
- test/multipart/filename_with_escaped_quotes_and_modification_param
|
196
|
+
- test/multipart/nested
|
197
|
+
- test/multipart/bad_robots
|
198
|
+
- test/multipart/filename_with_unescaped_quotes
|
199
|
+
- test/spec_head.rb
|
200
|
+
- test/spec_urlmap.rb
|
201
|
+
- test/spec_mongrel.rb
|
202
|
+
- test/spec_content_length.rb
|
203
|
+
- test/spec_session_cookie.rb
|
204
|
+
- test/spec_utils.rb
|
205
|
+
- test/spec_showexceptions.rb
|
206
|
+
- test/spec_lobster.rb
|
207
|
+
- test/spec_logger.rb
|
208
|
+
- test/spec_sendfile.rb
|
209
|
+
- test/spec_conditionalget.rb
|
210
|
+
- test/spec_lint.rb
|
211
|
+
- test/spec_deflater.rb
|
212
|
+
- test/rackup/config.ru
|
213
|
+
- test/spec_showstatus.rb
|
214
|
+
- test/spec_lock.rb
|
215
|
+
- test/spec_nulllogger.rb
|
216
|
+
- test/spec_config.rb
|
217
|
+
- test/spec_session_memcache.rb
|
218
|
+
- test/spec_runtime.rb
|
219
|
+
- test/spec_commonlogger.rb
|
220
|
+
- test/spec_directory.rb
|
221
|
+
- test/spec_cascade.rb
|
222
|
+
- test/spec_webrick.rb
|
223
|
+
- test/spec_request.rb
|
224
|
+
- test/spec_etag.rb
|
225
|
+
- test/spec_mock.rb
|
226
|
+
- test/cgi/sample_rackup.ru
|
227
|
+
- test/cgi/test
|
228
|
+
- test/cgi/test.fcgi
|
229
|
+
- test/cgi/lighttpd.conf
|
230
|
+
- test/cgi/rackup_stub.rb
|
231
|
+
- test/cgi/test.ru
|
232
|
+
- test/spec_builder.rb
|
233
|
+
- test/spec_auth_basic.rb
|
234
|
+
- test/unregistered_handler/rack/handler/unregistered.rb
|
235
|
+
- test/unregistered_handler/rack/handler/unregistered_long_one.rb
|
236
|
+
- test/spec_handler.rb
|
237
|
+
- test/spec_session_pool.rb
|
238
|
+
- test/spec_recursive.rb
|
239
239
|
- COPYING
|
240
240
|
- KNOWN-ISSUES
|
241
241
|
- rack.gemspec
|
@@ -272,45 +272,45 @@ signing_key:
|
|
272
272
|
specification_version: 3
|
273
273
|
summary: a modular Ruby webserver interface
|
274
274
|
test_files:
|
275
|
-
-
|
276
|
-
-
|
277
|
-
-
|
278
|
-
-
|
279
|
-
-
|
280
|
-
-
|
281
|
-
-
|
282
|
-
-
|
283
|
-
-
|
284
|
-
-
|
285
|
-
-
|
286
|
-
-
|
287
|
-
-
|
288
|
-
-
|
289
|
-
-
|
290
|
-
-
|
291
|
-
-
|
292
|
-
-
|
293
|
-
-
|
294
|
-
-
|
295
|
-
-
|
296
|
-
-
|
297
|
-
-
|
298
|
-
-
|
299
|
-
-
|
300
|
-
-
|
301
|
-
-
|
302
|
-
-
|
303
|
-
-
|
304
|
-
-
|
305
|
-
-
|
306
|
-
-
|
307
|
-
-
|
308
|
-
-
|
309
|
-
-
|
310
|
-
-
|
311
|
-
-
|
312
|
-
-
|
313
|
-
-
|
314
|
-
-
|
315
|
-
-
|
316
|
-
-
|
275
|
+
- test/spec_static.rb
|
276
|
+
- test/spec_content_type.rb
|
277
|
+
- test/spec_thin.rb
|
278
|
+
- test/spec_auth_digest.rb
|
279
|
+
- test/spec_response.rb
|
280
|
+
- test/spec_file.rb
|
281
|
+
- test/spec_rewindable_input.rb
|
282
|
+
- test/spec_methodoverride.rb
|
283
|
+
- test/spec_fastcgi.rb
|
284
|
+
- test/spec_chunked.rb
|
285
|
+
- test/spec_cgi.rb
|
286
|
+
- test/spec_head.rb
|
287
|
+
- test/spec_urlmap.rb
|
288
|
+
- test/spec_mongrel.rb
|
289
|
+
- test/spec_content_length.rb
|
290
|
+
- test/spec_session_cookie.rb
|
291
|
+
- test/spec_utils.rb
|
292
|
+
- test/spec_showexceptions.rb
|
293
|
+
- test/spec_lobster.rb
|
294
|
+
- test/spec_logger.rb
|
295
|
+
- test/spec_sendfile.rb
|
296
|
+
- test/spec_conditionalget.rb
|
297
|
+
- test/spec_lint.rb
|
298
|
+
- test/spec_deflater.rb
|
299
|
+
- test/spec_showstatus.rb
|
300
|
+
- test/spec_lock.rb
|
301
|
+
- test/spec_nulllogger.rb
|
302
|
+
- test/spec_config.rb
|
303
|
+
- test/spec_session_memcache.rb
|
304
|
+
- test/spec_runtime.rb
|
305
|
+
- test/spec_commonlogger.rb
|
306
|
+
- test/spec_directory.rb
|
307
|
+
- test/spec_cascade.rb
|
308
|
+
- test/spec_webrick.rb
|
309
|
+
- test/spec_request.rb
|
310
|
+
- test/spec_etag.rb
|
311
|
+
- test/spec_mock.rb
|
312
|
+
- test/spec_builder.rb
|
313
|
+
- test/spec_auth_basic.rb
|
314
|
+
- test/spec_handler.rb
|
315
|
+
- test/spec_session_pool.rb
|
316
|
+
- test/spec_recursive.rb
|