excon 0.0.24 → 0.0.25
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.
- data/excon.gemspec +2 -2
- data/lib/excon.rb +2 -1
- data/lib/excon/connection.rb +4 -3
- metadata +3 -3
data/excon.gemspec
CHANGED
@@ -13,8 +13,8 @@ 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.0.
|
17
|
-
s.date = '2010-
|
16
|
+
s.version = '0.0.25'
|
17
|
+
s.date = '2010-06-04'
|
18
18
|
s.rubyforge_project = 'excon'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
data/lib/excon.rb
CHANGED
@@ -4,6 +4,7 @@ $LOAD_PATH.unshift __DIR__ unless
|
|
4
4
|
$LOAD_PATH.include?(__DIR__) ||
|
5
5
|
$LOAD_PATH.include?(File.expand_path(__DIR__))
|
6
6
|
|
7
|
+
require 'cgi'
|
7
8
|
require 'openssl'
|
8
9
|
require 'socket'
|
9
10
|
require 'uri'
|
@@ -15,7 +16,7 @@ require 'excon/response'
|
|
15
16
|
module Excon
|
16
17
|
|
17
18
|
unless const_defined?(:VERSION)
|
18
|
-
VERSION = '0.0.
|
19
|
+
VERSION = '0.0.25'
|
19
20
|
end
|
20
21
|
|
21
22
|
CHUNK_SIZE = 1048576 # 1 megabyte
|
data/lib/excon/connection.rb
CHANGED
@@ -20,10 +20,11 @@ module Excon
|
|
20
20
|
unless params[:path][0..0] == '/'
|
21
21
|
params[:path] = "/#{params[:path]}"
|
22
22
|
end
|
23
|
-
request = "#{params[:method]} #{params[:path]}"
|
24
|
-
|
25
|
-
request << "
|
23
|
+
request = "#{params[:method]} #{params[:path]}?"
|
24
|
+
for key, value in (params[:query] || @connection[:query] || {})
|
25
|
+
request << "#{key}#{value && "=#{CGI.escape(value.to_s)}"}&"
|
26
26
|
end
|
27
|
+
request.chop!
|
27
28
|
request << " HTTP/1.1\r\n"
|
28
29
|
params[:headers] ||= @connection[:headers]
|
29
30
|
params[:headers]['Host'] ||= params[:host] || @connection[:host]
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 25
|
9
|
+
version: 0.0.25
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- geemus (Wesley Beary)
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-04 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|