rack-jsonp-middleware 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rack/jsonp.rb +1 -1
  2. metadata +5 -5
data/lib/rack/jsonp.rb CHANGED
@@ -20,7 +20,7 @@ module Rack
20
20
 
21
21
  status, headers, body = @app.call(env)
22
22
 
23
- if requesting_jsonp
23
+ if requesting_jsonp && headers['Content-Type'] && headers['Content-Type'].match(/application\/json/i)
24
24
  json = ""
25
25
  body.each { |s| json << s }
26
26
  body = ["#{callback}(#{json});"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-jsonp-middleware
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Roberto Decurnex
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-29 00:00:00 -03:00
18
+ date: 2010-12-30 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -92,6 +92,6 @@ rubyforge_project:
92
92
  rubygems_version: 1.3.7
93
93
  signing_key:
94
94
  specification_version: 3
95
- summary: rack-jsonp-middleware-0.0.3
95
+ summary: rack-jsonp-middleware-0.0.5
96
96
  test_files: []
97
97