excon 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of excon might be problematic. Click here for more details.

@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'excon'
16
- s.version = '0.3.5'
16
+ s.version = '0.3.6'
17
17
  s.date = '2010-12-22'
18
18
  s.rubyforge_project = 'excon'
19
19
 
@@ -13,7 +13,7 @@ require 'excon/response'
13
13
  module Excon
14
14
 
15
15
  unless const_defined?(:VERSION)
16
- VERSION = '0.3.5'
16
+ VERSION = '0.3.6'
17
17
  end
18
18
 
19
19
  unless const_defined?(:CHUNK_SIZE)
@@ -19,7 +19,7 @@ module Excon
19
19
  def initialize(url, params = {})
20
20
  uri = URI.parse(url)
21
21
  @connection = {
22
- :headers => { 'Host' => "#{uri.host}:#{uri.port}" },
22
+ :headers => {},
23
23
  :host => uri.host,
24
24
  :path => uri.path,
25
25
  :port => uri.port,
@@ -45,9 +45,7 @@ module Excon
45
45
  # connection has defaults, merge in new params to override
46
46
  params = @connection.merge(params)
47
47
  params[:headers] = @connection[:headers].merge(params[:headers] || {})
48
- if params[:host]
49
- params[:headers]['Host'] = params[:host]
50
- end
48
+ params[:headers]['Host'] ||= "#{params[:host]}:#{params[:port]}"
51
49
 
52
50
  # if path is empty or doesn't start with '/', insert one
53
51
  unless params[:path][0..0] == '/'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 6
10
+ version: 0.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - geemus (Wesley Beary)