http-request 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/http-request/connection.rb +16 -1
- data/lib/http-request/version.rb +1 -1
- metadata +5 -18
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YjJkZjJlNDg5NTQzZDc3MmFkM2ViMDc3OTk4ODZkM2Y4ZmY0Y2RkOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
M2JkNWI4MDRiMmZhZjNiMWRhZmEyODQwOWM3NzIxYTZlZDUzYjExOQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MTRjMDAxNzkwN2MzODNjYTY2M2QwMjYxYTEwMTI5OWM2MGQ1MWFjMGZjOTgx
|
10
|
+
NmNiOWRiNzU4Zjk2OGU5NTUzYzhjNWFmODcwN2U0NjcyM2Y1MWYzYjg0MDJh
|
11
|
+
ZjAzYmRkNzA4OWJiMTNlMjM1ZTUzOWM4NTE4NjAzNjcyYmUxMDE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
N2ViOWUxMDRmNDk5MmE2OGZhNWI0MDQ0MTVlMGRhZTk3Yzk2YWU5NjRhMGFk
|
14
|
+
YzE5YWY0MDdjNGU4YzZhZTg0ODBiMzhjMjBkMjQ5ZWNmMzkwYjdkMzkwYzIw
|
15
|
+
YjQ1YzRjOTZmNmY4M2U5YTgxMWExOGE2ZTQ2Njk4MzljYzBlM2Y=
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "cgi"
|
2
|
+
|
1
3
|
module HttpRequest
|
2
4
|
class Connection
|
3
5
|
attr_reader :uri, :http, :time_since_last_io
|
@@ -140,7 +142,20 @@ module HttpRequest
|
|
140
142
|
private
|
141
143
|
|
142
144
|
def parse_uri(url)
|
143
|
-
Addressable::URI.parse(Addressable::URI.encode(Addressable::URI.unencode(url)))
|
145
|
+
# Addressable::URI.parse(Addressable::URI.encode(Addressable::URI.unencode(url)))
|
146
|
+
# we need to make sure all kinds of unencoded urls and params are handled properly
|
147
|
+
# check specs for details
|
148
|
+
uri = Addressable::URI.parse(url)
|
149
|
+
new_uri = uri.clone
|
150
|
+
|
151
|
+
query_values = uri.query_values
|
152
|
+
query_string = query_values ? query_values.map{|k, v| "#{k}=#{CGI.escape(v)}"} : []
|
153
|
+
|
154
|
+
new_uri.path = uri.normalized_path
|
155
|
+
new_uri.host = uri.normalized_host
|
156
|
+
new_uri.query = query_string.join("&") if !query_string.empty?
|
157
|
+
|
158
|
+
new_uri
|
144
159
|
end
|
145
160
|
|
146
161
|
end
|
data/lib/http-request/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
5
|
-
prerelease:
|
4
|
+
version: 1.2.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Peter Kieltyka
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: addressable
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: mime-types
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -90,29 +81,25 @@ files:
|
|
90
81
|
- lib/http-request.rb
|
91
82
|
homepage: https://github.com/nulayer/http-request
|
92
83
|
licenses: []
|
84
|
+
metadata: {}
|
93
85
|
post_install_message:
|
94
86
|
rdoc_options: []
|
95
87
|
require_paths:
|
96
88
|
- lib
|
97
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
90
|
requirements:
|
100
91
|
- - ! '>='
|
101
92
|
- !ruby/object:Gem::Version
|
102
93
|
version: '0'
|
103
|
-
segments:
|
104
|
-
- 0
|
105
|
-
hash: 4305832184891146306
|
106
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
95
|
requirements:
|
109
96
|
- - ! '>='
|
110
97
|
- !ruby/object:Gem::Version
|
111
98
|
version: 1.3.6
|
112
99
|
requirements: []
|
113
100
|
rubyforge_project:
|
114
|
-
rubygems_version:
|
101
|
+
rubygems_version: 2.0.5
|
115
102
|
signing_key:
|
116
|
-
specification_version:
|
103
|
+
specification_version: 4
|
117
104
|
summary: Simple HTTP client built with Net/HTTP
|
118
105
|
test_files: []
|