nethttputils 0.3.2.11 → 0.3.3.0
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.
- checksums.yaml +4 -4
- data/lib/nethttputils.rb +11 -15
- data/nethttputils.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9afa291d86c40f37b207744ca23c7e12c330e055
|
|
4
|
+
data.tar.gz: 3afb6030d76642efed329bdf322c68dbb3eb2d00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a91b3cf20cbb611ff5e77d8efef83b37c01cabe413431dfb7edf7df9fe4c5eae4d92cf177891b04fd2e4a96b399871fcdc9b9afc2d2dd9926101b2321da5f28c
|
|
7
|
+
data.tar.gz: 137f44eee308529b23e5c6d9c592801950ddca31e156a6e0010b0a98f34cd8f758d6810143d34c0994b3ff17e42f1cc8a6d7608cdba9b7638c143781822732fa
|
data/lib/nethttputils.rb
CHANGED
|
@@ -217,7 +217,7 @@ module NetHTTPUtils
|
|
|
217
217
|
case response.code
|
|
218
218
|
when /\A30\d\z/
|
|
219
219
|
logger.info "redirect: #{response["location"]}"
|
|
220
|
-
new_uri = URI.join request.uri,
|
|
220
|
+
new_uri = URI.join request.uri, response["location"]
|
|
221
221
|
new_host = new_uri.host
|
|
222
222
|
raise Error.new "redirected in place" if new_uri == http.instance_variable_get(:@uri)
|
|
223
223
|
if http.address != new_host ||
|
|
@@ -371,20 +371,20 @@ if $0 == __FILE__
|
|
|
371
371
|
server = WEBrick::HTTPServer.new Port: 8000
|
|
372
372
|
server.mount_proc "/1" do |req, res|
|
|
373
373
|
next unless "GET" == req.request_method
|
|
374
|
-
res.cookies.push WEBrick::Cookie.new
|
|
375
|
-
res.cookies.push WEBrick::Cookie.new
|
|
376
|
-
res.cookies.push WEBrick::Cookie.new
|
|
377
|
-
res.cookies.push WEBrick::Cookie.new
|
|
378
|
-
res.cookies.push WEBrick::Cookie.new
|
|
379
|
-
res.cookies.push WEBrick::Cookie.new
|
|
374
|
+
res.cookies.push WEBrick::Cookie.new "1", "2"
|
|
375
|
+
res.cookies.push WEBrick::Cookie.new "3", "4"
|
|
376
|
+
res.cookies.push WEBrick::Cookie.new "8", "9"
|
|
377
|
+
res.cookies.push WEBrick::Cookie.new "a", "b"
|
|
378
|
+
res.cookies.push WEBrick::Cookie.new "1", "5"
|
|
379
|
+
res.cookies.push WEBrick::Cookie.new "f", "g h"
|
|
380
380
|
res.status = 300
|
|
381
381
|
res["location"] = "/2"
|
|
382
382
|
end
|
|
383
383
|
server.mount_proc "/2" do |req, res|
|
|
384
|
-
res.cookies.push WEBrick::Cookie.new
|
|
385
|
-
res.cookies.push WEBrick::Cookie.new
|
|
386
|
-
res.cookies.push WEBrick::Cookie.new
|
|
387
|
-
res.cookies.push WEBrick::Cookie.new
|
|
384
|
+
res.cookies.push WEBrick::Cookie.new "3", "6=c"
|
|
385
|
+
res.cookies.push WEBrick::Cookie.new "a", "d e"
|
|
386
|
+
res.cookies.push WEBrick::Cookie.new "8", ""
|
|
387
|
+
res.cookies.push WEBrick::Cookie.new "4", "7"
|
|
388
388
|
end
|
|
389
389
|
t = Thread.new{ server.start }
|
|
390
390
|
fail unless %w{ 3=6=c a=d\ e 8= 4=7 1=5 a=b } == p(NetHTTPUtils.request_data("http://localhost:8000/1").
|
|
@@ -501,10 +501,6 @@ if $0 == __FILE__
|
|
|
501
501
|
end
|
|
502
502
|
end
|
|
503
503
|
|
|
504
|
-
begin
|
|
505
|
-
fail NetHTTPUtils.request_data "https://oi64.tinypic.com/29z7oxs.jpg?", timeout: 5, max_start_http_retry_delay: -1
|
|
506
|
-
rescue Net::OpenTimeout => e
|
|
507
|
-
end
|
|
508
504
|
## this stopped failing on High Sierra
|
|
509
505
|
# begin
|
|
510
506
|
# # https://www.virtualself.co/?
|
data/nethttputils.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = "nethttputils"
|
|
3
|
-
spec.version = "0.3.
|
|
3
|
+
spec.version = "0.3.3.0"
|
|
4
4
|
spec.summary = "this tool is like a pet that I adopted young and now I depend on, sorry"
|
|
5
5
|
spec.description = <<-EOF
|
|
6
6
|
Back in 2015 I was a guy automating things at my job and two scripts had a common need --
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nethttputils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Victor Maslov aka Nakilon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-11-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |2
|
|
14
14
|
Back in 2015 I was a guy automating things at my job and two scripts had a common need --
|