rack-proxy 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rack/proxy.rb +5 -4
- 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: 783a9409fc6e9ca368d9b6d890b72108be49f3b4
|
4
|
+
data.tar.gz: efd58224498b8716cb29c68dfcf4a7b279f8f065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9a6c0b1cf2cea28e355aecdd16188c5cf34841f2fe68d1a209c4f95a57ba8292469d22b80390024764479db209039c1355920389f5ea56c028b43ea041a68fd
|
7
|
+
data.tar.gz: 9da6798ec4f37e85aad35a284f9b04b60cd92c0ba91c4eb3b73911efda48a7f10793c2d6f461254139883d21adea339e44435ca328a2b3e8f0c9f2ebaa2bc42f
|
data/Gemfile.lock
CHANGED
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.12"
|
9
9
|
|
10
10
|
class << self
|
11
11
|
def extract_http_request_headers(env)
|
@@ -98,14 +98,15 @@ module Rack
|
|
98
98
|
target_response.use_ssl = use_ssl
|
99
99
|
target_response.verify_mode = OpenSSL::SSL::VERIFY_NONE if use_ssl && ssl_verify_none
|
100
100
|
else
|
101
|
-
|
102
|
-
|
101
|
+
start_opts = use_ssl ? {:use_ssl => use_ssl} : {}
|
102
|
+
start_opts[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if use_ssl && ssl_verify_none
|
103
|
+
target_response = Net::HTTP.start(backend.host, backend.port, start_opts) do |http|
|
103
104
|
http.request(target_request)
|
104
105
|
end
|
105
106
|
end
|
106
107
|
|
107
108
|
headers = (target_response.respond_to?(:headers) && target_response.headers) || self.class.normalize_headers(target_response.to_hash)
|
108
|
-
body = target_response.body
|
109
|
+
body = target_response.body || [""]
|
109
110
|
body = [body] unless body.respond_to?(:each)
|
110
111
|
|
111
112
|
[target_response.code, headers, body]
|
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacek Becela
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|