rack-proxy 0.5.8 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 053b64c1db8f801c328770098e15672e2b17da53
4
- data.tar.gz: 7b114c1eecafdc79dab20c75a0daf073b87496be
3
+ metadata.gz: 77cfbad861512cde3b7cfc42fb55dbdc5732ac54
4
+ data.tar.gz: 41f8241e9bfea2cfec20820318c674ce2d5701bc
5
5
  SHA512:
6
- metadata.gz: cd49785b803394666dea8e1bd14d0afedb2da3b2d7f72ea6b57167d2cdc83cbf66e9864ce7c3d9314e7a00157531b11bb70e41cb4dc9341332317c6baf091750
7
- data.tar.gz: a30031d0598443126fcf82213dee26fd20443b4cd7f547080950d9a8f88b31dd712a245d0a9ef720e51ad54e885ba928449d08816179531b16ce0af093aae663
6
+ metadata.gz: 8132a893c3345caf4d4a4e0b4d57bf978606c6e462e45848cc4199f20485d6e5735cd7d32f564038332ad5608b91b8ed602680eda690d9bf8602cdf3d71033f7
7
+ data.tar.gz: 54496b618268e23ca229a7e8ce8a1a916991c4e2037c86bc47579faa9111adab18cf697e45db6cfbee5de35f2b25cb4e7ebf36857d7ff2361087d78c2fd045b9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-proxy (0.5.8)
4
+ rack-proxy (0.5.9)
5
5
  rack
6
6
 
7
7
  GEM
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"
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
 
@@ -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.8
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-10-14 00:00:00.000000000 Z
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack