758 Commits

Author SHA1 Message Date
HoneyryderChuck
87cacb98a5 bumped to 0.5.1 v0.5.1 2019-10-13 18:31:52 +01:00
HoneyryderChuck
44fb9f1820 Merge branch 'issue-59' into 'master'
Fixing buffer usage

Closes #57

See merge request honeyryderchuck/httpx!51
2019-10-13 17:12:22 +00:00
HoneyryderChuck
f1fb88be86 added ipaddr explicitly for jruby 2019-10-13 13:21:30 +01:00
HoneyryderChuck
a5b65ac78a fixed flaky related with the cname test (test all dns records in the same way 2019-10-13 01:45:10 +01:00
HoneyryderChuck
933d319b0b using byteslice instead of slice for buffer manipulation
The code from which the buffer and string handling was adapted,
inherited also the usage of slice!, which is not the appropriate tool
for when dealing with byte streams. Ruby doesn't have an equivalent
String#byteslice! yet, so we adapted other known workarounds (see
https://bugs.ruby-lang.org/issues/13626) for our code. This means that:

- For HTTPX::Buffer, we add a shift! method, as all usage shift the
buffer part which has been written to the socket;
- For HTTP1 parser and Chunker, we have to double the usage of
byteslice. In the cases where it results in nil, we might needlessly
initialize an empty string, however this is the lesser of evils, until a
proper backport is in place.
2019-10-12 20:57:44 +01:00
HoneyryderChuck
a059726b9e compression: added some behaviours from net-http
After looking at net-http code, decided to adopt the following
behaviour:

* do not send accept-encoding when sending Range header
* remove content-encoding from response headers as we decode them

in order for user code to track what was decoded, added
HTTPX::Response::Body#encodings, which returns the array of encodings
for which the body was successfully decoded
2019-10-12 20:55:16 +01:00
HoneyryderChuck
508b5b96ee Merge branch 'issue-59' into 'master'
do not compare options objects by request-level options

Closes #59

See merge request honeyryderchuck/httpx!46
2019-10-11 15:41:35 +00:00
HoneyryderChuck
3669fd0597 Merge branch 'http-2-no-error' into 'master'
do not raise exception when connection/stream is reset with no error

See merge request honeyryderchuck/httpx!48
2019-10-08 13:15:44 +00:00
HoneyryderChuck
a4d83103d2 do not compare options objects by request-level options 2019-10-08 00:36:09 +01:00
HoneyryderChuck
6a095c21e9 do not raise exception when connection/stream is reset with no error 2019-10-08 00:35:57 +01:00
HoneyryderChuck
6c1c1f5ee7 Merge branch 'reliable-tests' into 'master'
increased the number of workers both on nghttpx and httpbin

See merge request honeyryderchuck/httpx!49
2019-10-07 23:35:24 +00:00
HoneyryderChuck
d71529712c increased the number of workers both on nghttpx and httpbin, which decreased massively the number of sporadic timeouts; updated setups as well 2019-10-08 00:27:41 +01:00
HoneyryderChuck
5a3d19c7e8 bumping to 0.5 v0.5.0 2019-09-29 01:46:33 +01:00
HoneyryderChuck
32999dfde1 jekyll: reverted config.yml.erb, as it wasn't deploying properly 2019-09-29 01:32:14 +01:00
HoneyryderChuck
d51c569447 again, raise error, not message 2019-09-29 01:31:59 +01:00
HoneyryderChuck
e0d90b63ba Merge branch 'fix-timeouts' into 'master'
Fix selector timeouts

See merge request honeyryderchuck/httpx!47
2019-09-28 00:08:41 +00:00
HoneyryderChuck
7a35329854 buffer for response must be kept in ascii, and only transformed later 2019-09-28 00:52:49 +01:00
HoneyryderChuck
95ae9c8d6d raising error instead of just message 2019-09-28 00:52:49 +01:00
HoneyryderChuck
237c3863f5 updating faraday support for 0.16 version 2019-09-27 20:42:40 +01:00
HoneyryderChuck
be39f6b901 making the selector closer to the nio4r pure ruby selector
Some requests were hanging because some connection with read interests
were only on the writers selector. This issue manifested itself in high
load scenarios.

The fix is not the most performant, but it does the job: only set write
interest when connecting, otherwise read/write. This increases the
number of wakeups, but at least we have correctness.
2019-09-27 20:14:43 +01:00
HoneyryderChuck
c1d8b30d08 this test always fails when debug mode is on 2019-09-27 12:39:07 +01:00
HoneyryderChuck
d4973bdeb3 changed some test configuration 2019-09-27 12:39:07 +01:00
HoneyryderChuck
ce4e50180e making requests close its own timer 2019-09-27 12:39:07 +01:00
HoneyryderChuck
34869659a1 support new minitest var 2019-09-27 12:39:06 +01:00
HoneyryderChuck
7bc11048f2 moving away from timeout object a-la-httprb. it now just stores the timeouts; these are used after in the loop and timers (for total timeout) 2019-09-27 12:39:06 +01:00
HoneyryderChuck
9fd4852564 removed @error ivar from connection 2019-09-27 12:39:06 +01:00
HoneyryderChuck
99a221dbc9 added timers gem, and a timer group to the pool 2019-09-27 12:39:06 +01:00
HoneyryderChuck
860866eb86 Merge branch 'issue-57' into 'master'
when response does not have a body, do return an unfrozen empty string (fixes #57)

Closes #57

See merge request honeyryderchuck/httpx!45
2019-09-27 11:38:38 +00:00
HoneyryderChuck
032769ccf1 Merge branch 'fix-altsvc' into 'master'
Fix ALTSVC parsing

See merge request honeyryderchuck/httpx!44
2019-09-26 14:25:56 +00:00
HoneyryderChuck
44c16c7d88 do not run parallel tests (for now) 2019-09-26 14:16:24 +01:00
HoneyryderChuck
0a3c3bedc7 when response does not have a body, do return an unfrozen empty string (fixes #57) 2019-09-26 14:08:58 +01:00
HoneyryderChuck
1b50e90654 fixed the altsvc parser for when multiple services are passed; also, made the tests for the component more granular 2019-09-25 17:43:45 +01:00
HoneyryderChuck
debbf5ee8f reset timeout counter before raising errors 2019-09-25 02:39:47 +01:00
HoneyryderChuck
57a85de999 made the timeout logic around connections more simple 2019-09-25 02:39:14 +01:00
HoneyryderChuck
9ec6be0279 faraday: always force response body into string (fixes #57) 2019-09-25 01:46:12 +01:00
HoneyryderChuck
391ecf71d6 filtering invalid nameservers out (Fixes #56)
some IPv6 nameservers are misconfigured in some machines, with invalid
IPv6 addresses. We filter them out now.

https://gitlab.com/honeyryderchuck/httpx/issues/56
2019-09-18 14:43:03 +01:00
HoneyryderChuck
0a82e8d98d linting v0.4.1 2019-06-27 11:49:39 +01:00
HoneyryderChuck
2db49f30dc fixed faraday test to use the new key 2019-06-27 11:44:45 +01:00
HoneyryderChuck
f9604d41ac fixup! native resolver: retry DNS queries on next nameserver when current is not reachable 2019-06-27 11:37:27 +01:00
HoneyryderChuck
1c40a76778 bumping to 0.4.1 2019-06-27 11:22:17 +01:00
HoneyryderChuck
070e896b1e native resolver: retry DNS queries on next nameserver when current is not reachable 2019-06-27 11:22:03 +01:00
HoneyryderChuck
d77eb9d6cf faraday: abstract options generation to an helper method, as this became way too complex 2019-06-27 11:20:44 +01:00
HoneyryderChuck
5681039ada fixed how ssl options are passed in faraday 2019-06-27 10:54:10 +01:00
HoneyryderChuck
16fc56759a fixed webpage links, loading dynamic version 2019-06-25 23:46:53 +01:00
HoneyryderChuck
9a4b836ae7 error response must also reflect the request 2019-05-24 17:58:29 +03:00
HoneyryderChuck
08fd0452e9 Merge branch 'blog' into 'master'
Blog

See merge request honeyryderchuck/httpx!43
2019-05-24 14:10:35 +00:00
HoneyryderChuck
26efb9daea Blog 2019-05-24 14:10:31 +00:00
HoneyryderChuck
4e3ff764a3 bumping to 0.4.0 v0.4.0 2019-05-20 16:41:38 +03:00
HoneyryderChuck
d2037a4cc8 example script to test reconnection 2019-05-20 16:40:54 +03:00
HoneyryderChuck
14e6619d92 defining equality of options, using it to deduplicate connections as well 2019-05-20 16:40:19 +03:00