akamai-edgegrid 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. data/lib/akamai/edgegrid.rb +7 -3
  2. metadata +2 -2
@@ -78,8 +78,12 @@ module Akamai #:nodoc:
78
78
  # Creates a new Akamai::Edgegrid::HTTP object (takes same options as Net::HTTP)
79
79
  def initialize(address, port)
80
80
  super(address, port)
81
- @use_ssl = true
82
- @verify_mode = OpenSSL::SSL::VERIFY_PEER
81
+ if port == 80
82
+ @use_ssl = false
83
+ else
84
+ @use_ssl = true
85
+ @verify_mode = OpenSSL::SSL::VERIFY_PEER
86
+ end
83
87
  end
84
88
 
85
89
  # Creates a signing key based on the secret and timestamp
@@ -119,7 +123,7 @@ module Akamai #:nodoc:
119
123
  data_to_sign = [
120
124
  request.method,
121
125
  url.scheme,
122
- url.host,
126
+ request.key?('host') ? request['host'] : url.host,
123
127
  url.request_uri,
124
128
  canonicalize_headers(request),
125
129
  make_content_hash(request),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akamai-edgegrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-16 00:00:00.000000000 Z
12
+ date: 2014-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simplecov