rack-post-body-to-params 0.1.2 → 0.1.3
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.
- data/VERSION +1 -1
- data/lib/rack/post-body-to-params.rb +10 -6
- data/rack-post-body-to-params.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -84,13 +84,17 @@ module Rack
|
|
84
84
|
|
85
85
|
if @content_types.include? content_type
|
86
86
|
post_body = env[POST_BODY].read
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
87
|
+
|
88
|
+
unless post_body.blank?
|
89
|
+
begin
|
90
|
+
new_form_hash = parsers[content_type].call post_body
|
91
|
+
rescue Exception => error
|
92
|
+
logger.warn "#{self.class} #{content_type} parsing error: #{error.to_s}" if respond_to? :logger
|
93
|
+
return error_responses[content_type].call error
|
94
|
+
end
|
95
|
+
env.update(FORM_HASH => new_form_hash, FORM_INPUT => env[POST_BODY])
|
92
96
|
end
|
93
|
-
|
97
|
+
|
94
98
|
end
|
95
99
|
|
96
100
|
@app.call(env)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-post-body-to-params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Niko Dittmann
|