wreq 1.3.3-aarch64-linux → 1.3.5-aarch64-linux
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/wreq_ruby/3.3/wreq_ruby.so +0 -0
- data/lib/wreq_ruby/3.4/wreq_ruby.so +0 -0
- data/lib/wreq_ruby/4.0/wreq_ruby.so +0 -0
- data/test/error_handling_test.rb +39 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45ad61657a00e07711b764f4fad6b2cadb0efd0ca2ac3854c5e247796b38c379
|
|
4
|
+
data.tar.gz: 18e91f0979a5b8dd2817623a955f9cb05df3538255cc9d4aab26b0e69b1be779
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8fb555bc1da4ca7fbb9cc3e0d8dd86f1f50097c323224a27370f3b60ec2d9a85e46259e426e9204bb10b78c7e4a427d18f3b11b40a58c887b7e1bab8a4dd0d25
|
|
7
|
+
data.tar.gz: 5994c14fa896693fdb6a608acf6ae5f908f8e08f10ce350b05fb2e7d0fcbaf6508126f47cd370ab4e0e92a2de5cfc32f26061662fc3356499bb9c93ae75ce904
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/test/error_handling_test.rb
CHANGED
|
@@ -121,8 +121,47 @@ class ErrorHandlingTest < Minitest::Test
|
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
def test_proxy_tcp_connect_timeout_keeps_proxy_error
|
|
125
|
+
skip "Requires a stalled TCP handshake from a full loopback accept queue" unless RUBY_PLATFORM.include?("linux") || Gem.win_platform?
|
|
126
|
+
|
|
127
|
+
with_stalled_tcp_listener do |port|
|
|
128
|
+
%w[http socks5h].each do |scheme|
|
|
129
|
+
client = Wreq::Client.new(proxy: "#{scheme}://127.0.0.1:#{port}", connect_timeout: 1, timeout: 5)
|
|
130
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
131
|
+
|
|
132
|
+
error = assert_raises(Wreq::ProxyConnectionError, "#{scheme} proxy TCP deadline") do
|
|
133
|
+
client.get("https://127.0.0.1:443/")
|
|
134
|
+
end
|
|
135
|
+
assert_instance_of Wreq::ProxyConnectionError, error
|
|
136
|
+
assert_operator Process.clock_gettime(Process::CLOCK_MONOTONIC) - start, :>=, 0.9,
|
|
137
|
+
"#{scheme} proxy should time out, not fail immediately"
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
124
142
|
private
|
|
125
143
|
|
|
144
|
+
def with_stalled_tcp_listener
|
|
145
|
+
sockets = []
|
|
146
|
+
listener = Socket.new(:INET, :STREAM)
|
|
147
|
+
listener.bind(Socket.sockaddr_in(0, "127.0.0.1"))
|
|
148
|
+
listener.listen(0)
|
|
149
|
+
address = listener.local_address
|
|
150
|
+
|
|
151
|
+
# Leave the accept queue full and verify a subsequent dial stays pending.
|
|
152
|
+
pending = 8.times.any? do
|
|
153
|
+
socket = Socket.new(:INET, :STREAM)
|
|
154
|
+
sockets << socket
|
|
155
|
+
socket.connect_nonblock(address, exception: false) == :wait_writable &&
|
|
156
|
+
IO.select(nil, [socket], nil, 0.2).nil?
|
|
157
|
+
end
|
|
158
|
+
assert pending, "Expected a stalled TCP handshake on the loopback fixture"
|
|
159
|
+
yield address.ip_port
|
|
160
|
+
ensure
|
|
161
|
+
sockets.each(&:close)
|
|
162
|
+
listener&.close
|
|
163
|
+
end
|
|
164
|
+
|
|
126
165
|
def with_hanging_server
|
|
127
166
|
server = TCPServer.new("127.0.0.1", 0)
|
|
128
167
|
accepted = Queue.new
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wreq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.5
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- SearchApi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: An easy and powerful Ruby HTTP client with advanced browser fingerprinting
|
|
14
14
|
that accurately emulates Chrome, Edge, Firefox, Safari, Opera, and OkHttp with precise
|