rack-proxy 0.5.2 → 0.5.3

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 +5 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3428e6ef27227f99c1dcf5d72a6a36ab5c1c3563
4
- data.tar.gz: 29204ed05a07cf2372c3b7fd81d03647304372e0
3
+ metadata.gz: 5b5e4098e672e8f351869c3e653df25debcd6929
4
+ data.tar.gz: 36f5cded44c00c69310d9fce890cdca2ab8b5a5c
5
5
  SHA512:
6
- metadata.gz: d39750e97c1b8eab48ca445eb212d563838e22a40012daac9343f225bfebd882a2896282ea05df6c926343e8c9b5d274a7d2ec449de5cc4becc4c2440a6827fc
7
- data.tar.gz: d2b51386bae91a75e07ead88fed9b21e8dade23032034da2cd9b420a6d5f5047b3fce3f8b49ff00a27ec19d391004261f46ed642bfd01334773561394bdb2368
6
+ metadata.gz: e369d9bbab745f08bca90759ddf9cd16b88e0731f5701f53a3f61b24b3a46cc7a83116d3c8742b5c5a4928bb707736e422b996797ef30f390263d3d9c77aa43f
7
+ data.tar.gz: ec8ee5d1be8ee68e1e87c629ff8068154c2b05eaff8844ea9dd1d5b6d325213ba555f35e63a7b7a9584f9d2bdef509cfc48378fad8635d6e2209fb4aca81297a
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.2"
8
+ VERSION = "0.5.3"
9
9
 
10
10
  # @option opts [String, URI::HTTP] :backend Backend host to proxy requests to
11
11
  def initialize(opts={})
@@ -65,7 +65,10 @@ module Rack
65
65
  end
66
66
 
67
67
  headers = (target_response.respond_to?(:headers) && target_response.headers) || {}
68
- [target_response.code, headers, target_response.body]
68
+ body = target_response.body
69
+ body = [body] unless body.respond_to?(:each)
70
+
71
+ [target_response.code, headers, body]
69
72
  end
70
73
 
71
74
  def extract_http_request_headers(env)
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.2
4
+ version: 0.5.3
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-09-30 00:00:00.000000000 Z
11
+ date: 2013-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack