rack-proxy 0.5.8 → 0.5.9
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 +2 -2
- data/test/rack_proxy_test.rb +7 -0
- 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: 77cfbad861512cde3b7cfc42fb55dbdc5732ac54
|
4
|
+
data.tar.gz: 41f8241e9bfea2cfec20820318c674ce2d5701bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8132a893c3345caf4d4a4e0b4d57bf978606c6e462e45848cc4199f20485d6e5735cd7d32f564038332ad5608b91b8ed602680eda690d9bf8602cdf3d71033f7
|
7
|
+
data.tar.gz: 54496b618268e23ca229a7e8ce8a1a916991c4e2037c86bc47579faa9111adab18cf697e45db6cfbee5de35f2b25cb4e7ebf36857d7ff2361087d78c2fd045b9
|
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.9"
|
9
9
|
|
10
10
|
# @option opts [String, URI::HTTP] :backend Backend host to proxy requests to
|
11
11
|
def initialize(opts={})
|
@@ -73,7 +73,7 @@ module Rack
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
headers = (target_response.respond_to?(:headers) && target_response.headers) ||
|
76
|
+
headers = (target_response.respond_to?(:headers) && target_response.headers) || target_response.to_hash
|
77
77
|
body = target_response.body
|
78
78
|
body = [body] unless body.respond_to?(:each)
|
79
79
|
|
data/test/rack_proxy_test.rb
CHANGED
@@ -28,6 +28,13 @@ class RackProxyTest < Test::Unit::TestCase
|
|
28
28
|
assert_match(/Jacek Becela/, last_response.body)
|
29
29
|
end
|
30
30
|
|
31
|
+
def test_http_full_request_headers
|
32
|
+
app(:streaming => false)
|
33
|
+
app.host = 'www.google.com'
|
34
|
+
get "/"
|
35
|
+
assert !Array(last_response['Set-Cookie']).empty?, 'Google always sets a cookie, yo. Where my cookies at?!'
|
36
|
+
end
|
37
|
+
|
31
38
|
def test_https_streaming
|
32
39
|
app.host = 'www.apple.com'
|
33
40
|
get 'https://example.com'
|
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.9
|
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-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|