bogo 0.1.20 → 0.1.22

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: 802b39d900a5909611b6aaffd3a419e2a82492a4
4
- data.tar.gz: 13faec66be7d72b8150a2edb8ad30a5df28adac0
3
+ metadata.gz: eacb7f10b81571c766b7759aa06a996ab4ec27e3
4
+ data.tar.gz: 09e823bcc4bba8a285e77dab4b447b206d22ca30
5
5
  SHA512:
6
- metadata.gz: 714a82d0202b13f31c40238104551710a4754b92d25166b76d07b4410a102572f9c0a378ec1173bd2ba69241b9a7f1bada30baa03fd253969a01c0ddb6ba5ec7
7
- data.tar.gz: 08f764cf4ebac3f9e88b36af71da9696f844c6d51d7a437ff42d0ad473b9888ff0a8c7c24ca9ecdce23a8f34837ef9e8faa176541e13fa128e801106b1523f24
6
+ metadata.gz: ce3eb6340472885af82320813bb344df09fbf3ce7d5c343df5544c4413b971f89f53d374d9a040c9c47fb2f4daebf654afc138ac4b691b5f01fe1ac98cda1222
7
+ data.tar.gz: 309fed02b6250c5dafe73388aa2851bd0a7370f13779ae28be0b94b045bd5b79fa70f9f32e5632806ae5a9d9293676fe7510b50962c0ebf7297d932d1d3eed30
@@ -1,3 +1,6 @@
1
+ ## v0.1.22
2
+ * Fix CONNECT requests for HTTPS endpoints to properly include port
3
+
1
4
  ## v0.1.20
2
5
  * Add lazy proxy support monkey patch for http library
3
6
  * [Lazy] Return default values when no data has been loaded
@@ -9,6 +9,9 @@ require 'http/request'
9
9
  class HTTP::Request
10
10
 
11
11
  # Override to implicitly apply proxy as required
12
+ #
13
+ # NOTE: If dealing with https request, force port so CONNECT request
14
+ # will properly include destination port
12
15
  def proxy
13
16
  if((@proxy.nil? || @proxy.empty?) && ENV["#{uri.scheme}_proxy"] && proxy_is_allowed?)
14
17
  _proxy = URI.parse(ENV["#{uri.scheme}_proxy"])
@@ -36,4 +39,20 @@ class HTTP::Request
36
39
  end
37
40
  end
38
41
 
42
+ # Compute HTTP request header SSL proxy connection
43
+ #
44
+ # NOTE: Provide override to get port included within request
45
+ def proxy_connect_header
46
+ if(@uri.port.nil?)
47
+ if(@uri.scheme == 'https')
48
+ dest_port = 443
49
+ else
50
+ dest_port = 80
51
+ end
52
+ else
53
+ dest_port = @uri.port
54
+ end
55
+ "CONNECT #{@uri.host}:#{dest_port} HTTP/#{version}"
56
+ end
57
+
39
58
  end
@@ -1,4 +1,4 @@
1
1
  module Bogo
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.1.20')
3
+ VERSION = Gem::Version.new('0.1.22')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bogo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie