simple-http 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple/http.rb +8 -2
- data/lib/simple/http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 629d4ae6ecbf63473054f8cdc95b88bdae1a5251
|
4
|
+
data.tar.gz: 782dab2622b3d481d9dd5eabc77231707a5b0abe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b6b5133cd3ad03c1f2bf29a96e8c21bfdfd5df97de3c57aaa3dc1da6da3e59dc964085f1e86cf8255ca4126aad3d5871f715f9061f47a36277a53634c0c1a2a
|
7
|
+
data.tar.gz: d6c270201e14f28b6edde03a28571a9bcc46aa792a0751ac07b61a5144331a9f5d07c4c6e548f3f9abc3aa9ee0c48abb2495c3dc38e5b24b81e9bc3525ca78ad
|
data/lib/simple/http.rb
CHANGED
@@ -150,8 +150,14 @@ class Simple::HTTP
|
|
150
150
|
if max_redirections <= 0
|
151
151
|
raise TooManyRedirections.new(method, request, respons)
|
152
152
|
end
|
153
|
-
|
154
|
-
|
153
|
+
|
154
|
+
target_url = response["Location"]
|
155
|
+
unless target_url =~ /^(http|https):\/\//
|
156
|
+
base_url = "#{uri.scheme}://#{uri.host}"
|
157
|
+
File.join base_url, target_url
|
158
|
+
end
|
159
|
+
|
160
|
+
return http_(:GET, target_url, nil, {}, max_redirections - 1)
|
155
161
|
end
|
156
162
|
|
157
163
|
#
|
data/lib/simple/http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Simple code for simple HTTP requests
|
14
14
|
email: eno@radiospiel.org
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
49
|
rubyforge_project:
|
50
|
-
rubygems_version: 2.
|
50
|
+
rubygems_version: 2.5.1
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Simple code for simple HTTP requests
|