rack 1.6.9 → 1.6.10
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rack might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/rack.rb +1 -1
- data/lib/rack/methodoverride.rb +5 -1
- data/rack.gemspec +1 -1
- data/test/spec_methodoverride.rb +17 -1
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 054e343b38a83a00ffc626cb6d3b92e21454c0fb
|
4
|
+
data.tar.gz: 1f4c8f6e31f4e368371392a63d5232203be385d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 534da9c1e081350058c84fb1a1cc0c12beb6512f36fbd8f0651d96c2de6f5a911b9bbd900f88b0ca373b8b7c86a5d61f32d8c1ce6ef5e3ea1afd2dbf1c356451
|
7
|
+
data.tar.gz: 973368cf843dcd7ff8854a4c9af6f9e48ffd1a30200a765c7a0102c475aa0adf1c469f43c4ef955234ed41d4e5f03d99305ec46aae3b07df901a7148eaaf179a
|
data/lib/rack.rb
CHANGED
data/lib/rack/methodoverride.rb
CHANGED
@@ -26,7 +26,11 @@ module Rack
|
|
26
26
|
req = Request.new(env)
|
27
27
|
method = method_override_param(req) ||
|
28
28
|
env[HTTP_METHOD_OVERRIDE_HEADER]
|
29
|
-
|
29
|
+
begin
|
30
|
+
method.to_s.upcase
|
31
|
+
rescue ArgumentError
|
32
|
+
env["rack.errors"].puts "Invalid string for method"
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
private
|
data/rack.gemspec
CHANGED
data/test/spec_methodoverride.rb
CHANGED
@@ -8,7 +8,7 @@ describe Rack::MethodOverride do
|
|
8
8
|
[200, {"Content-Type" => "text/plain"}, []]
|
9
9
|
}))
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
should "not affect GET requests" do
|
13
13
|
env = Rack::MockRequest.env_for("/?_method=delete", :method => "GET")
|
14
14
|
app.call env
|
@@ -23,6 +23,22 @@ describe Rack::MethodOverride do
|
|
23
23
|
env["REQUEST_METHOD"].should.equal "PUT"
|
24
24
|
end
|
25
25
|
|
26
|
+
if RUBY_VERSION >= "1.9"
|
27
|
+
should "set rack.errors for invalid UTF8 _method values" do
|
28
|
+
errors = StringIO.new
|
29
|
+
env = Rack::MockRequest.env_for("/",
|
30
|
+
:method => "POST",
|
31
|
+
:input => "_method=\xBF".force_encoding("ASCII-8BIT"),
|
32
|
+
"rack.errors" => errors)
|
33
|
+
|
34
|
+
app.call env
|
35
|
+
|
36
|
+
errors.rewind
|
37
|
+
errors.read.should.equal "Invalid string for method\n"
|
38
|
+
env["REQUEST_METHOD"].should.equal "POST"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
26
42
|
should "modify REQUEST_METHOD for POST requests when X-HTTP-Method-Override is set" do
|
27
43
|
env = Rack::MockRequest.env_for("/",
|
28
44
|
:method => "POST",
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Neukirchen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bacon
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: |
|
@@ -55,6 +55,12 @@ extra_rdoc_files:
|
|
55
55
|
- KNOWN-ISSUES
|
56
56
|
- HISTORY.md
|
57
57
|
files:
|
58
|
+
- COPYING
|
59
|
+
- HISTORY.md
|
60
|
+
- KNOWN-ISSUES
|
61
|
+
- README.rdoc
|
62
|
+
- Rakefile
|
63
|
+
- SPEC
|
58
64
|
- bin/rackup
|
59
65
|
- contrib/rack.png
|
60
66
|
- contrib/rack.svg
|
@@ -63,6 +69,7 @@ files:
|
|
63
69
|
- example/lobster.ru
|
64
70
|
- example/protectedlobster.rb
|
65
71
|
- example/protectedlobster.ru
|
72
|
+
- lib/rack.rb
|
66
73
|
- lib/rack/auth/abstract/handler.rb
|
67
74
|
- lib/rack/auth/abstract/request.rb
|
68
75
|
- lib/rack/auth/basic.rb
|
@@ -86,6 +93,7 @@ files:
|
|
86
93
|
- lib/rack/directory.rb
|
87
94
|
- lib/rack/etag.rb
|
88
95
|
- lib/rack/file.rb
|
96
|
+
- lib/rack/handler.rb
|
89
97
|
- lib/rack/handler/cgi.rb
|
90
98
|
- lib/rack/handler/evented_mongrel.rb
|
91
99
|
- lib/rack/handler/fastcgi.rb
|
@@ -95,7 +103,6 @@ files:
|
|
95
103
|
- lib/rack/handler/swiftiplied_mongrel.rb
|
96
104
|
- lib/rack/handler/thin.rb
|
97
105
|
- lib/rack/handler/webrick.rb
|
98
|
-
- lib/rack/handler.rb
|
99
106
|
- lib/rack/head.rb
|
100
107
|
- lib/rack/lint.rb
|
101
108
|
- lib/rack/lobster.rb
|
@@ -104,10 +111,10 @@ files:
|
|
104
111
|
- lib/rack/methodoverride.rb
|
105
112
|
- lib/rack/mime.rb
|
106
113
|
- lib/rack/mock.rb
|
114
|
+
- lib/rack/multipart.rb
|
107
115
|
- lib/rack/multipart/generator.rb
|
108
116
|
- lib/rack/multipart/parser.rb
|
109
117
|
- lib/rack/multipart/uploaded_file.rb
|
110
|
-
- lib/rack/multipart.rb
|
111
118
|
- lib/rack/nulllogger.rb
|
112
119
|
- lib/rack/recursive.rb
|
113
120
|
- lib/rack/reloader.rb
|
@@ -126,9 +133,9 @@ files:
|
|
126
133
|
- lib/rack/static.rb
|
127
134
|
- lib/rack/tempfile_reaper.rb
|
128
135
|
- lib/rack/urlmap.rb
|
129
|
-
- lib/rack/utils/okjson.rb
|
130
136
|
- lib/rack/utils.rb
|
131
|
-
- lib/rack.rb
|
137
|
+
- lib/rack/utils/okjson.rb
|
138
|
+
- rack.gemspec
|
132
139
|
- test/builder/anything.rb
|
133
140
|
- test/builder/comment.ru
|
134
141
|
- test/builder/end.ru
|
@@ -229,13 +236,6 @@ files:
|
|
229
236
|
- test/testrequest.rb
|
230
237
|
- test/unregistered_handler/rack/handler/unregistered.rb
|
231
238
|
- test/unregistered_handler/rack/handler/unregistered_long_one.rb
|
232
|
-
- COPYING
|
233
|
-
- KNOWN-ISSUES
|
234
|
-
- rack.gemspec
|
235
|
-
- Rakefile
|
236
|
-
- README.rdoc
|
237
|
-
- SPEC
|
238
|
-
- HISTORY.md
|
239
239
|
homepage: http://rack.github.io/
|
240
240
|
licenses:
|
241
241
|
- MIT
|
@@ -246,17 +246,17 @@ require_paths:
|
|
246
246
|
- lib
|
247
247
|
required_ruby_version: !ruby/object:Gem::Requirement
|
248
248
|
requirements:
|
249
|
-
- -
|
249
|
+
- - ">="
|
250
250
|
- !ruby/object:Gem::Version
|
251
251
|
version: '0'
|
252
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
253
|
requirements:
|
254
|
-
- -
|
254
|
+
- - ">="
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project: rack
|
259
|
-
rubygems_version: 2.
|
259
|
+
rubygems_version: 2.6.13
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: a modular Ruby webserver interface
|