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.
- checksums.yaml +4 -4
- data/lib/rack/proxy.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b5e4098e672e8f351869c3e653df25debcd6929
|
4
|
+
data.tar.gz: 36f5cded44c00c69310d9fce890cdca2ab8b5a5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2013-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|