159 Commits

Author SHA1 Message Date
HoneyryderChuck
c5512dbbeb enable push frames in no push test in order to force refusal 2021-01-14 00:34:51 +00:00
HoneyryderChuck
a29961962b allowing multipart requests to be retried (although, to be fair, user has to push a lot of knobs to do so) 2021-01-13 13:40:05 +00:00
HoneyryderChuck
42297cd38d simplifying apis, testing pathnames 2021-01-13 12:27:13 +00:00
HoneyryderChuck
25d5e93248 added additional tests for the future accepted variationns of multipart parameters 2021-01-13 00:00:09 +00:00
HoneyryderChuck
e1ccae25f9 added a global store for domains not supporting 100-continue
it's a pretty naive implementation, as it grows unbounded, and isn't
thread safe, mostly due to negligent cost of fake fetch.
2021-01-12 23:53:18 +00:00
HoneyryderChuck
68baf484da reshaping the way 100 responses are handled, by keeping informational status (right now working only for 100, as 101 breaks h2c) 2021-01-12 17:43:14 +00:00
HoneyryderChuck
75089a334a added test for Socks5 connection establishment using an IP.
The test only tests IPv4 due to lack of support for IPv6 in the current
docker test suite, but IPv6 is expected to work as well.
2021-01-09 17:14:36 +00:00
HoneyryderChuck
0c646ced85 fixed expect 100 plugin delay feature
another bug gets fixed after adding a test... the delay of sending the
request body when server doesn't support the Expect-100 continue dance
wasn't using the proper API. Adapted the handling of the state machine
to be more readable and compliant as well.
2021-01-09 16:20:01 +00:00
HoneyryderChuck
256ec59bdd added resolver alias test 2021-01-09 01:58:03 +00:00
HoneyryderChuck
fab44b5993 verifyig error responses annd deltas using internal methods 2021-01-05 18:57:39 +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
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
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
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
34dc7df495 ensurinng that the push promise test sends requests sequentially 2020-11-26 17:20:13 +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
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
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
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
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
f8877df2e1 enforce the nneed for the response body class to be a subclass of the response body 2020-10-30 16:19:18 +00:00
HoneyryderChuck
7d9c5a722e added tests for build_request as public api from session 2020-10-06 16:23:18 +01:00
HoneyryderChuck
754bb6b5ed Merge branch 'issue-86' into 'master'
:compression_threshold_size

Closes #86

See merge request honeyryderchuck/httpx!86
2020-04-28 10:32:45 +00:00
HoneyryderChuck
7c08527cb9 added support for :compression_threshold_size, in order to bypass compression when not worth it 2020-04-27 00:13:51 +01:00
HoneyryderChuck
93a4b933af added support for :expect_threshold_size, to disable expect: 100-continue based on body bytesize sent 2020-04-26 23:52:14 +01:00
HoneyryderChuck
af2524cf6e abstracted retry request verification to an helper method 2020-04-18 17:40:29 +01:00
HoneyryderChuck
4af6c14fdc typo 2020-04-12 03:32:04 +01:00
HoneyryderChuck
0136200b85 allow parser to close connection by passing a special flag
this works for http/1, where one can close the socket immediately.
2020-04-12 03:32:04 +01:00
HoneyryderChuck
727c6112b3 added test for retrying change requests; this will prevent the recent issue with persistent connections failing in the first retried request with body 2020-03-28 15:44:46 +00:00
HoneyryderChuck
f76b22e25f Merge branch 'improvements' into 'master'
Improvements

See merge request honeyryderchuck/httpx!77
2020-03-24 23:00:25 +00:00