643 Commits

Author SHA1 Message Date
HoneyryderChuck
0668ff6d92 added separate configs per ruby version, which helps keeping up the level of granularity way better than just having a single rubocop_todo.yml; fixed a few cases based on some missing cops 2018-12-28 14:13:38 +00:00
HoneyryderChuck
7673f572c2 support rubocop also for ruby 2.1 and 2.2 2018-12-28 02:53:58 +00:00
HoneyryderChuck
622188c0ab updated rubocop, added a few changes... 2018-12-28 02:44:43 +00:00
HoneyryderChuck
cfccff1d8d added 2.6 to the CI suite 2018-12-28 02:39:03 +00:00
HoneyryderChuck
61f5b2e92d bumping to 0.3.1, adding docs v0.3.1 2018-12-27 16:25:40 +00:00
HoneyryderChuck
2bcd54cfc1 resolv also used here 2018-12-27 16:07:51 +00:00
HoneyryderChuck
12bc8a6e9e Merge branch 'issue-41' into 'master'
fixed DNS query module, where uncaching entries was just trying to perform a...

Closes #41

See merge request honeyryderchuck/httpx!34
2018-12-27 16:07:10 +00:00
HoneyryderChuck
fdeaf1f918 fixed DNS query module, where uncaching entries was just trying to perform a different query after some time, until all record types (A and AAAA) were drained; this also clears the logic on when a tcp connection can't be established cuz EHOSTUNREACH 2018-12-27 15:59:07 +00:00
HoneyryderChuck
a72f1981ff https resolver: recovering from dns encoding/decoding errors 2018-12-27 15:58:56 +00:00
HoneyryderChuck
1267feb8ae Merge branch 'issue-39' into 'master'
Better DNS error handling

Closes #40

See merge request honeyryderchuck/httpx!35
2018-12-27 15:56:03 +00:00
HoneyryderChuck
8c437e1564 recovering from dns encoding/decoding errors 2018-12-27 15:43:53 +00:00
HoneyryderChuck
ab7e916262 recovering from possible resolv errors in the system resolver 2018-12-27 15:37:00 +00:00
HoneyryderChuck
999e99a680 resolv errors: always use original exception message 2018-12-27 15:18:17 +00:00
HoneyryderChuck
999b4f54df better error handling in dns resolver modules 2018-12-24 02:53:19 +00:00
HoneyryderChuck
c5ddcc9f43 system resolver: recover from EHOSTUNREACH properly 2018-12-23 18:30:36 +00:00
HoneyryderChuck
b41d1dc026 added link for multipart wiki page 2018-12-05 15:21:14 +00:00
HoneyryderChuck
22e8e6d148 bumping to 0.3.0 v0.3.0 2018-12-01 19:52:32 +00:00
HoneyryderChuck
8970ebec96 some more examples in the cheatsheet 2018-12-01 19:51:45 +00:00
HoneyryderChuck
a2458c02a4 fixed HTTP/2 issue introduced when allowing servers to negotiate connection first; some servers might wait for the client to initiate negotiation, in which case, the client has to do it, otherwise there's gonna be a block. Tested with https://www.google.com, which required it 2018-12-01 19:23:52 +00:00
HoneyryderChuck
ee2c736709 added a cheatsheet 2018-11-23 18:07:01 +00:00
HoneyryderChuck
adcd70d0a5 Merge branch 'master' of gitlab.com:honeyryderchuck/httpx 2018-11-23 18:04:58 +00:00
HoneyryderChuck
d46f26391b Merge branch 'http-form-data-plugin' into 'master'
Added multipart plugin, to handle multipart requests

See merge request honeyryderchuck/httpx!32
2018-11-23 18:04:50 +00:00
HoneyryderChuck
bde0dd1332 added top-level #wrap 2018-11-23 18:04:25 +00:00
HoneyryderChuck
ce674ff4e2 Added multipart plugin, to handle multipart requests
This logic was extracted from the vanilla httpx build to a plugin to
make the gem "leaner", by removing "http_form_data" as a hard
dependency.

The multipart plugin still requires one to install it though, but if you
don't need to upload files, you don't have to install the gem anymore
2018-11-23 16:06:25 +00:00
HoneyryderChuck
82ef579047 Merge branch 'issue-32' into 'master'
HTTP/1: recovering if only one response comes

See merge request honeyryderchuck/httpx!27
2018-11-23 14:28:44 +00:00
HoneyryderChuck
02542d3c02 emit and set the keep alive timeout to the channel, now that channels do their own accounting 2018-11-22 18:08:37 +00:00
HoneyryderChuck
648a0258ce capping the number of requests that can be done on a connection in HTTP/1 based on max value from keep-alive header, after which a new connection must be established; loading the keep-alive timeout for a future timeout feature 2018-11-22 18:08:37 +00:00
HoneyryderChuck
91be043a52 guarding against pipelining errors on keep-alive connections, in which the first request will be received, but the second will timeout; in such cases, disable_pipelining and retry; only infer pipelining if at least 2 requests have been flushed in the buffer at the same time 2018-11-22 18:08:37 +00:00
HoneyryderChuck
083dd5ae6d moved on connection close to separate method, which will address all connection logic 2018-11-22 18:08:37 +00:00
HoneyryderChuck
6c890bfa12 added support for http-2 0.10.1 2018-11-22 18:08:29 +00:00
HoneyryderChuck
0d912bceaf removed 0.9 from supported versions again 2018-11-22 18:08:25 +00:00
HoneyryderChuck
d13864df4e transitioning the timeout between open and idle, depending of connection having channels connecting 2018-11-22 18:07:45 +00:00
HoneyryderChuck
befbd818b8 fixing the decrease of the timeouts for the individual channels 2018-11-22 18:07:45 +00:00
HoneyryderChuck
9d516f461c fixed timeout error raise 2018-11-22 18:07:45 +00:00
HoneyryderChuck
63690f05fd defaulting to 5 seconds for connect timeout in test-mode 2018-11-22 18:07:45 +00:00
HoneyryderChuck
0a5d1dc7e2 settings the timeout defaults to the same used by net-http 2018-11-22 18:07:45 +00:00
HoneyryderChuck
a3037fa030 connection keeps track of connected channels; it will instantiate proper timeout based on these 2018-11-22 18:07:45 +00:00
HoneyryderChuck
38e00d219f moved connection timeout counting to the channel; the timeout error also contains the interval that timed out; the bookkeeping is therefore kept by each channel 2018-11-22 18:07:45 +00:00
HoneyryderChuck
cf46b530c1 changed loop_timeout to operation_timeout, deprecating loop_timeout in level-1 log 2018-11-22 18:07:45 +00:00
HoneyryderChuck
d9c7edceea introducing the ConnectTimeoutError, releasing it on timeout errors on channels when the channel is still connecting 2018-11-22 18:07:45 +00:00
HoneyryderChuck
03376524fe accepting a connect timeout in the timeout module 2018-11-22 18:07:45 +00:00
HoneyryderChuck
75831ebdb7 parsing altsvc headers alternatively for ruby 2.1 2018-11-22 18:07:45 +00:00
HoneyryderChuck
fba036d3cb properly fail proxy when all proxy options are over (and not fail with a cryptic URI to Hash error) 2018-11-22 18:07:45 +00:00
HoneyryderChuck
706c841e05 refining http-2 client in order to be able to accept settings frame from server and be properly initialized 2018-11-22 18:07:45 +00:00
HoneyryderChuck
5b7762c7b9 added tests for altsvc header parsing 2018-11-22 18:07:45 +00:00
HoneyryderChuck
7b92fa07ea fix alternative channel creation (find before create) 2018-11-22 18:07:45 +00:00
HoneyryderChuck
484da4fd6b set alt-used header on requests routed to altsvc, do not reroute them more 2018-11-22 18:07:45 +00:00
HoneyryderChuck
3d9ac01120 added an #altsvc_match? specific for URIs, where one can successfully match against other altsvc origins AND requests that might be routed through it 2018-11-22 18:07:45 +00:00
HoneyryderChuck
713d5dfb6f allow channels to purge pending requests using #purge_pending, which will delete_if 2018-11-22 18:07:45 +00:00
HoneyryderChuck
7f3ca7e8e5 propagate results of receiving the alt-svc frame, which might arrive just after h2 connection negotiation; for this to be effective, we really have to guarantee negotiation establishment before sending requests, though 2018-11-22 18:07:45 +00:00