362 Commits

Author SHA1 Message Date
HoneyryderChuck
8a570f7d4c fixing location of origins var 2021-01-04 18:53:54 +00:00
HoneyryderChuck
1537ffb10f improving error message of coalescing test 2021-01-04 18:47:49 +00:00
HoneyryderChuck
d460a9c839 another try at fixing the RUBYOPT issue 2021-01-03 18:22:25 +00:00
HoneyryderChuck
5083186654 do not overwrite RUBYOPT (because of jit values) 2021-01-03 18:12:35 +00:00
HoneyryderChuck
cacd740843 giving the native resolver timeout test a bit more delta, as it fails often with concurrency set 2021-01-03 15:39:13 +00:00
HoneyryderChuck
5b0cbe4ec7 fail when any command in build.sh fails 2021-01-02 03:39:11 +00:00
HoneyryderChuck
4c5b59d2c3 integrating the integration tests in CI, disable parallel mode for them
as one can't guarantee that the third-party modules we integrate with
are safe to run concurrently, we're left best running them sequentially.
For our first integration, webmock, this holds true.
2021-01-01 16:56:36 +00:00
HoneyryderChuck
1313478f6c added test for dns timeouts, which uncovered a bug.
There were errors inn the code handling the retries. This has been dealt
with, along with a new exception (HTTPX::ResolveTimeoutError)
2020-12-24 12:38:14 +00:00
HoneyryderChuck
623ad7d50a enabling auto-compaction in GC 2020-12-18 18:16:01 +00:00
HoneyryderChuck
65f5e86f3f allowing nested params also when posting multipart requests 2020-12-10 13:46:57 +00:00
HoneyryderChuck
0bb18ad500 added urlformencoder which encodes form data the way rack is used to, when nested 2020-12-10 01:07:18 +00:00
HoneyryderChuck
392dadcb78 typing the connection parsers 2020-12-07 17:46:45 +00:00
HoneyryderChuck
beb0a82baa typing selector and connection 2020-12-07 16:30:39 +00:00
HoneyryderChuck
d3a6edeecb fixed socks4a handshake while adding more socks4 tests
the packet wasn't being well formed in certain situations. Also, raised
restrictions for IPv6 addresses, as hton is implemented in more recent
rubies for them as well.
2020-12-02 01:30:38 +00:00
HoneyryderChuck
201591e9fe added test for the socks5 non-happy path 2020-12-02 01:30:38 +00:00
HoneyryderChuck
c67ae0582d added test for host unreachable when connecting to the nameservers 2020-12-02 01:30:38 +00:00
HoneyryderChuck
282dff83cb reworking resolver error tests, making resolver resilient to wrong record types from user 2020-12-02 01:30:38 +00:00
HoneyryderChuck
7a5eaa3795 using the same strategy when exiting early from unexpected dns errors
there was a :resolve_error already in place for this. this extends the
same strategy for https and native resolvers, thereby fixing potential
bugs.
2020-12-02 01:30:38 +00:00
HoneyryderChuck
c98d568e07 fixed some bugs from the https resolver while improving coverage
* it now fails hard  if the dns server is a domain and it's not
  resolvable;
* it properly handles retries for other record types (p.ex. when A query
  fails, and AAAA follows);
2020-12-02 01:30:38 +00:00
HoneyryderChuck
37999cc39e improved testing of body transcoder 2020-12-02 01:30:38 +00:00
HoneyryderChuck
3bf3223c60 fixing another loop error when proxy needs to be resolved, by resolving
fails

While adding yet another test, an edge case was found where a proxy had
to be resolved, but when the resolving failed, the process wasn't
recovering from it.
2020-11-30 12:16:36 +00:00
HoneyryderChuck
035eda1f95 fixed another loop caused by certain connection goaway frames from
server not being processed

While introducing yet another test to catch frame processing errors, in
this case with the SETTINGS_TIMEOUT error, another loop was found. It
was caused by two reasons:

* connection was signaling it was "closing" on such an error, which is
  not really true (server already closed the stream, so no need to
  close it again); it should be marked as closed instead.
* write buffer was still full (with the handshake in this case), so the
  connection was still trying to write;
2020-11-27 13:47:36 +00:00
HoneyryderChuck
e6c9bb4714 fix: http/1.1 recover from connection exhausted
While adding the test, the code to recover from an exhausted HTTP/1.1
connection proved not to be reliable, as it wasn't taking inflight
requests nor update-once keep-alive max requests counters into
account.

This has been fixed by implementing our own test dummy using
webrick.
2020-11-26 20:11:30 +00:00
HoneyryderChuck
34dc7df495 ensurinng that the push promise test sends requests sequentially 2020-11-26 17:20:13 +00:00
HoneyryderChuck
7f9e68ba3b fixed: session hangs when HTTP/2 receives a 421
While adding a test, a bug was found, where an HTTP/2 connection
receiving a 421 response wasn't redirecting the request well to an
HTTP/1.1 one. This has been fixed by changing the way a new connection
is instantiated.
2020-11-26 17:13:02 +00:00
HoneyryderChuck
322aa06f22 added a test for when an http/2 connection exhausts and a second connection has to be established 2020-11-26 17:12:09 +00:00
HoneyryderChuck
350a030473 sleep skews a bit under load, increasing it for reliability 2020-11-24 17:21:29 +00:00
HoneyryderChuck
cb3e57e10d fixing log_exception signature 2020-11-24 16:38:46 +00:00
HoneyryderChuck
6cc24b63f5 forcing request fo fail with exception when there's an error (since we're supporting only 1 stream request at a time, this should be straightforward) 2020-11-24 00:42:54 +00:00
HoneyryderChuck
742d877c76 added #each_line method to stream response 2020-11-24 00:42:52 +00:00
HoneyryderChuck
1b29e062a0 added streaming plugin tests 2020-11-22 22:32:38 +00:00
HoneyryderChuck
7e26c86dc1 really closing a response (won't buffer stuff anymore after being closed) 2020-11-22 15:55:44 +00:00
HoneyryderChuck
fa2fd818fe added explicit response closing in tests 2020-11-22 15:55:43 +00:00
HoneyryderChuck
86f1db5bf0 disabling IDN support for ruby < 2.3 2020-11-07 15:36:21 +00:00
HoneyryderChuck
1b26977d16 updated rubocop to 1.0.0 on possible rubies, making the necessary changes 2020-11-07 15:36:21 +00:00
HoneyryderChuck
d900225f2e added ascii url request tests 2020-11-07 01:41:05 +00:00
HoneyryderChuck
fe0fc841c9 Merge branch 'breadcrumb' into 'master'
adding breadcrumbs to the jekyll layouts

See merge request honeyryderchuck/httpx!100
2020-11-06 17:26:35 +00:00
HoneyryderChuck
5f735cc6f5 Merge branch 'issue-50' into 'master'
rate limiter plugin

See merge request honeyryderchuck/httpx!99
2020-11-06 17:25:06 +00:00
HoneyryderChuck
98b7d2fc04 using build matrix to test JIT in its own build step 2020-11-06 17:16:02 +00:00
HoneyryderChuck
62467ff5c5 persistent and retries plugin now work well together
When persistent and retries are loaded separately, the options won't be
just overwritten; instead, changes will be kept, and max_retries will be
the max value of what both plugins load (in case the user sets its own
option)
2020-11-05 16:20:16 +00:00
HoneyryderChuck
048501e940 adding and integrating the new cookie modules for: store, jar, cookie, and domain name 2020-11-04 00:32:01 +00:00
HoneyryderChuck
959429b386 improved cookies testing, to test also the array-of-cookie-hashes case; does not accept a string anymore, as besides untested, it wasn't working properly 2020-11-03 16:33:11 +00:00
HoneyryderChuck
01552757a0 supporting the retry-after header for redirections as well 2020-10-31 14:15:28 +00:00
HoneyryderChuck
1ad2e9cbcf implemented the rate limiter plugin 2020-10-31 14:15:28 +00:00
HoneyryderChuck
6f2048952f updating retry_after call test (2 arguments now) 2020-10-31 02:09:31 +00:00
HoneyryderChuck
1934e84bcd added the rate limiter tests 2020-10-31 01:08:44 +00:00
HoneyryderChuck
2a49fbc78f moved custom plugins used in tests to the support dir 2020-10-31 01:07:26 +00:00
HoneyryderChuck
96eaf1ef05 moar coverage 2020-10-30 16:19:18 +00:00
HoneyryderChuck
0fe4040da0 improved the parser coverage
* removed needless tests;
* testing error paths;
* removed some unreachable code;
* removed branching of #parse calls;
2020-10-30 16:19:18 +00:00
HoneyryderChuck
9efd2a0a2e fixed the request mock, which triggered a typing error 2020-10-30 16:19:18 +00:00