753 Commits

Author SHA1 Message Date
HoneyryderChuck
403911f0b2 getting addresses from channel first also in the system resolver 2018-12-28 14:21:26 +00:00
HoneyryderChuck
7a6e8c669d removing lonely operator, as it causes parsing errors in ruby <= 2.2 2018-12-28 14:21:26 +00:00
HoneyryderChuck
fcc1e2a2b8 moved net-ssh deps to Gemfile 2018-12-28 14:21:26 +00:00
HoneyryderChuck
52cb379ad9 some ruby 2.3 syntax 2018-12-28 14:21:25 +00:00
HoneyryderChuck
72f5fbdfc9 ssh proxy: added support for https requests too 2018-12-28 14:21:25 +00:00
HoneyryderChuck
cf7b4bff94 Fixed issue when IO was passed as an option, but a DNS query was still
issued to the request host, which doesn't make sense.

This also fixed an inconsistency when passing an hash of IOs. The key of
that hash MUST match the request authority for the channel to properly
assign it.
2018-12-28 14:21:25 +00:00
HoneyryderChuck
2051aef665 added implementation of ssh proxy using ssh gateway; simply opening it, opening a socket, and passing it through; this has the slight downside of not being able to open multiple ssh proxies in the same client, so we're bound to one domain 2018-12-28 14:21:25 +00:00
HoneyryderChuck
ddd27a3b36 added ssh proxy test 2018-12-28 14:21:25 +00:00
HoneyryderChuck
86a9a707ea added more config to the ssh proxy image 2018-12-28 14:21:25 +00:00
HoneyryderChuck
51554b42aa added ssh gateway image, which will serve to test the implementation 2018-12-28 14:21:25 +00:00
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