rack-jsonr 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rack/jsonr/jsonr.rb +5 -2
- data/lib/rack/jsonr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWIzYzNkMGRhZmY5MDQxYzg2OTY3MWQyOGNmOTc2NGEzZmUyNTU0Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Zjg5MzBjOGVjMzI4MDhkOTRhODE0NGE1MDlmMGYzYTBhNDZhYzYyNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmYzZWVlOGNjNGE3M2E2MDc2ZGNhM2JkOTMwMzgzZGNjZGQ2ZDdiMjczZDIz
|
10
|
+
YzA1ZjFiY2E3NjM3NDNiYTY0MjAyMGRhYTI0NjdjYTNlY2JhYjExZWU0YTFj
|
11
|
+
YzVlNWYyOTU2MjNjMDUzYzMxYjljMzc3OTc0MTdhOTk2ZDM3OTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2IzNjA0NzNlMzEzOTM3NDQxMjJjZWFiNDZmY2I2ZmYxYTU3NDE4YzM3MTE5
|
14
|
+
ZGRjY2JjOTA5NTJiNDI1NThmMjFlNGRiNWIxMmE5MTI5ZWEzOGMwM2YwNDZl
|
15
|
+
MmE3YzExNGE1MDRiYzk5NzRiYzYxYjZjN2UwZmU0NmRiY2VkOTY=
|
data/lib/rack/jsonr/jsonr.rb
CHANGED
@@ -26,8 +26,11 @@ module Rack
|
|
26
26
|
request = Rack::Request.new(env)
|
27
27
|
params = request.params
|
28
28
|
|
29
|
-
if is_jsonp_request?(request)
|
30
|
-
env['
|
29
|
+
if is_jsonp_request?(request)
|
30
|
+
env['IS_REQUESTING_JSONP'] = true
|
31
|
+
env['REQUEST_METHOD'] = params['request_method'].upcase if params['request_method'] and ['POST','PUT','DELETE'].include?(params['request_method'].upcase)
|
32
|
+
else
|
33
|
+
env['IS_REQUESTING_JSONP'] = false
|
31
34
|
end
|
32
35
|
|
33
36
|
if is_jsonp_request?(request) and is_json_response?(headers)
|
data/lib/rack/jsonr/version.rb
CHANGED