rack-proxy 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rack/proxy.rb +3 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0883f974b445bea61720cacc4c0f28237d0ec849
4
- data.tar.gz: a701b9271fce5e9344da71b807bedafc98a44e02
3
+ metadata.gz: 0d3d10314d397ff73d14421024f662ee818be5ce
4
+ data.tar.gz: ce5856ec13f3a36c7132fa24fbff7a56d2a9203c
5
5
  SHA512:
6
- metadata.gz: 32c96b55564c08d97621d39616d49f31db4d2a2bb232163266fd20a6a7e4a9367e4fd900cf720dd4e07c76157f6f407c2b29bb2f7731a9cbbc72a99c1c7717ea
7
- data.tar.gz: a9e7b0d178b9aaccd09381b78ec794318705f9ef6144e58a52743fc2034b7fe579044fe855468966e1f3a371e5e9b2517e895d1524c4df116e20ea4827422f07
6
+ metadata.gz: 407afac47e2f903fb5c379b2281a771d5ef00620b2c4dbef55a6a6048dc8af839cd02b6f623b43a9234f07ed6988bf64586b65549fe477af364404721cc45590
7
+ data.tar.gz: 8845e00d5f435acd21bcf2702be29a2e49ed03723317bae6cdb16e2da77bfc0a5ea9ee7a9f92a51854898a83e67138e4a30250e0eea49e379956e31aad14f595
data/lib/rack/proxy.rb CHANGED
@@ -5,7 +5,7 @@ module Rack
5
5
 
6
6
  # Subclass and bring your own #rewrite_request and #rewrite_response
7
7
  class Proxy
8
- VERSION = "0.5.0"
8
+ VERSION = "0.5.1"
9
9
 
10
10
  # @option opts [String, URI::HTTP] :backend Backend host to proxy requests to
11
11
  def initialize(opts={})
@@ -72,7 +72,8 @@ module Rack
72
72
  http.request(target_request)
73
73
  end
74
74
 
75
- triplet = [target_response.code, target_response.headers, target_response.body]
75
+ headers = (target_response.respond_to?(:headers) && target_response.headers) || {}
76
+ triplet = [target_response.code, headers, target_response.body]
76
77
  end
77
78
 
78
79
  triplet
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacek Becela
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-21 00:00:00.000000000 Z
11
+ date: 2013-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack