http-request 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.
- data/VERSION +1 -1
- data/lib/http-request.rb +5 -5
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.3
|
data/lib/http-request.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# +-------------------------------------------------------------------------------+
|
|
2
2
|
# | HttpRequest |
|
|
3
3
|
# +-------------------------------------------------------------------------------+
|
|
4
|
-
# | Author:
|
|
4
|
+
# | Author: Nulayer Inc. / www.nulayer.com |
|
|
5
5
|
# +-------------------------------------------------------------------------------+
|
|
6
6
|
# | BSD LICENSE |
|
|
7
|
-
# | Copyright (c) 2007-
|
|
7
|
+
# | Copyright (c) 2007-2011, Nulayer Inc. |
|
|
8
8
|
# | All rights reserved. |
|
|
9
9
|
# | |
|
|
10
10
|
# | Redistribution and use in source and binary forms, with or without |
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
require 'net/http'
|
|
34
34
|
|
|
35
35
|
class HttpRequest
|
|
36
|
-
VERSION = '1.0.
|
|
37
|
-
|
|
36
|
+
VERSION = '1.0.3'
|
|
37
|
+
|
|
38
38
|
class HTTPError < StandardError; end
|
|
39
39
|
class UnexpectedError < StandardError; end
|
|
40
40
|
|
|
@@ -126,7 +126,7 @@ class HttpRequest
|
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
# Handle URL Redirection
|
|
129
|
-
if response.kind_of?(Net::HTTPRedirection)
|
|
129
|
+
if response.kind_of?(Net::HTTPRedirection) && !header['location'].nil?
|
|
130
130
|
update_uri_location(header['location'])
|
|
131
131
|
request type, options.merge({ :redirect_limit => redirect_limit-1 })
|
|
132
132
|
end
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 1
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
version: 1.0.
|
|
8
|
+
- 3
|
|
9
|
+
version: 1.0.3
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Peter Kieltyka
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date:
|
|
17
|
+
date: 2011-01-27 00:00:00 -05:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies: []
|
|
20
20
|
|