1416 Commits

Author SHA1 Message Date
HoneyryderChuck
ae4b7545b2 added the first grpc test, initially using the gprc gem stub client 2021-04-20 19:04:19 +01:00
HoneyryderChuck
9e10ee44eb Merge branch 'base-ruby' into 'master'
using stock base ruby images

See merge request honeyryderchuck/httpx!128
2021-04-20 10:03:28 +00:00
HoneyryderChuck
73de78efa6 fixed rubocop's new minor version hassles
also, changed the target ruby version, first time this ever happens.
2021-04-20 10:45:27 +01:00
HoneyryderChuck
00439ab26f remove (apparently needless?) call to Datadog.reset in the integration tests 2021-04-20 10:36:29 +01:00
HoneyryderChuck
96013c334c fixed socket errors tests (messages different in non-alpine) 2021-04-20 10:36:29 +01:00
HoneyryderChuck
b474dee12c update init script, don't need to install so much 2021-04-20 10:36:29 +01:00
HoneyryderChuck
a6718b7ab1 ditch alpine, use base images 2021-04-19 15:43:52 +01:00
HoneyryderChuck
81ce3686d5 Merge branch 'improvements' into 'master'
improvements

Closes #118

See merge request honeyryderchuck/httpx!127
2021-04-12 17:01:46 +00:00
HoneyryderChuck
3cf47a4865 http2_settings -> wait_for_handshake option
(false by default) when true, requests will be immediately buffered
before HTTP/2 handshake is complete.
2021-04-12 16:38:12 +01:00
HoneyryderChuck
351276dcb5 added support for multiple header frame received callback calls, by merging them (trailer header case) 2021-04-12 16:38:11 +01:00
HoneyryderChuck
82dc700059 callbacks: use symbol comparison instead, even at the cost of an yoda cond 2021-04-12 00:26:53 +01:00
HoneyryderChuck
bc6bc903fc moved default options out of the initializer 2021-04-08 17:46:54 +01:00
HoneyryderChuck
bf0ec99794 removed the timeout class 2021-04-08 17:34:19 +01:00
HoneyryderChuck
383d624b71 changed all def_option from plugins to use the eval'ed string approach 2021-04-08 15:58:10 +01:00
HoneyryderChuck
c5b191d4e1 Options: allow to call def_option with a string
One can pass the body to be class_eval'ed, making the option not depend
on define_method.
2021-04-08 15:34:10 +01:00
HoneyryderChuck
261dc9af30 raise an HTTPX::Error when passed an unknown option
before, a random NoMethodError was being raised. now, an helpful message
and an HTTPX error people might be rescuing will be raised.
2021-04-07 10:05:50 +01:00
HoneyryderChuck
58824d1acd do not do check on pathname without checking for existence (breaks if pathname lib isn't required) 2021-04-06 20:23:45 +01:00
HoneyryderChuck
06fd76892c bumped to 0.13.2 v0.13.2 2021-04-02 09:55:00 +01:00
HoneyryderChuck
1381db1f7d Merge branch 'issue-36' into 'master'
native resolver: read/write only when necessary

Closes #36

See merge request honeyryderchuck/httpx!126
2021-04-02 08:40:16 +00:00
HoneyryderChuck
53b894170d reinstated the legacy UDP#write for jruby, because there's no sendmsg_nonblock 2021-04-01 19:59:39 +01:00
HoneyryderChuck
6e4ce5a638 using sendmsg_nonblock instead of #send for udp writes 2021-04-01 19:06:28 +01:00
HoneyryderChuck
6f5dd472f0 native resolver: read/write only when necessary
windows udp sockets return WSAEINVAL if recvfrom_nonblock is called when
unbounded, ie. when not bound to an address in listener mode, nor before
actually sending data, which is our case.

This fix works the same way as HTTP connections, i.e. by avoiding
read/write operations when there's no need. This can also give us some
performance.

Fixes #36
2021-04-01 18:30:21 +01:00
HoneyryderChuck
011a70a598 do not try to upgrade an error response 2021-04-01 09:52:49 +01:00
HoneyryderChuck
8ec74402f1 bumped to 0.13.1 v0.13.1 2021-03-27 19:15:53 +00:00
HoneyryderChuck
ff057861a7 rescue EALREADY for exception: false calls to connect_nonblock 2021-03-27 19:08:45 +00:00
HoneyryderChuck
fe6bbe0058 bumped to 0.13.0 v0.13.0 2021-03-27 16:28:43 +00:00
HoneyryderChuck
e8bf83c24e Merge branch 'issue-116' 2021-03-27 15:40:20 +00:00
HoneyryderChuck
1ef0371ef0 skip pipelining if the client isn't pipelining 2021-03-26 23:49:19 +00:00
HoneyryderChuck
3c2abce23a optimization: do not merge options wit itself (which was happening, producing the same data, but different identity) 2021-03-23 16:30:45 +00:00
HoneyryderChuck
61631ada18 removed Options.defined_options
using instance variables to get definition of an hash representation
instead.
2021-03-23 16:30:45 +00:00
HoneyryderChuck
9363d09af8 removed with_ methods from option (not of real world use)
removed with_ options, which are unsupported, undocumented and irrelevant (contrary to the similar with session methods)
2021-03-23 16:30:45 +00:00
HoneyryderChuck
40ef6734a4 blog post: oidc provider using rodauth-oauth on rails 2021-03-23 16:30:29 +00:00
HoneyryderChuck
5ccedf5022 Merge branch 'per-plugin-registries' into 'master'
per-session registries

See merge request honeyryderchuck/httpx!125
2021-03-11 18:36:29 +00:00
HoneyryderChuck
00faafddc9 added tests around the tcp connect errors 2021-03-11 17:58:24 +00:00
HoneyryderChuck
23310e5ebf remove unreachable special callback
this was causing some unfortunate loops around the tcp connect, and
judging by the history, it's solving an issue related to the https
resolver, which has changed and stabilized significantly.
2021-03-09 19:28:00 +00:00
HoneyryderChuck
cad4079cb3 making sure that addresses map to proper addrinfo when in tcp mode 2021-03-09 19:27:14 +00:00
HoneyryderChuck
e34c998f5a removing weird synchronizes around the unix test server 2021-03-08 17:20:53 +00:00
HoneyryderChuck
8a33a9f4db removing unneeded cond (it's already done in the initializer) 2021-03-08 17:04:36 +00:00
HoneyryderChuck
765fc540f4 fixing inspection of ios 2021-03-08 17:04:36 +00:00
HoneyryderChuck
fbf9b12a0b bugfix: ensuring :io option as hash works
while adding tests, found out that io as hash of authority => io wasn't
working due to missing uri extensions. Made sure the same works for unix
sockets.
2021-03-08 17:04:36 +00:00
HoneyryderChuck
889cc80820 using same transition state logging for all sockets 2021-03-08 16:11:28 +00:00
HoneyryderChuck
13edbc738a using exception. false on ssl socket connect_nonblock
using the same exceptionless-api as used for tcp sockets.
2021-03-08 16:11:28 +00:00
HoneyryderChuck
3cad111674 fix: ensuring that a new ipaddress gets picked up if the current is unreachable 2021-03-08 16:11:28 +00:00
HoneyryderChuck
1367b664da using exception: false on connect_nonblock
TCP sockets support calling connect_nonblock with the exception flag
since ruby 2.3 . This commit introduces the branching between both
versions.
2021-03-08 16:11:28 +00:00
HoneyryderChuck
0a0300c5eb trimming, and testing passing the io when the transport is to be a unix socket 2021-03-08 12:49:33 +00:00
HoneyryderChuck
0fb343056d introducing :addresses option
(This deprecates the :transport_options option)

This should be given an array of peer addresses to connect to. It can be
used when the destination IPs are known and you want to avoid resolving
them, and when the destination is a unix socket (and the destination is
a FS path)
2021-03-08 12:46:20 +00:00
HoneyryderChuck
108837e25e bugfix: do not resolve connection which are already resolved
connections which either already contain addresses, or were given an
open IO object, should be marked as resolved, and should not go through
the resolver.
2021-03-08 12:42:32 +00:00
HoneyryderChuck
e8ac876443 setting the upgrade handlers per session. 2021-03-07 16:18:44 +00:00
HoneyryderChuck
d501840669 registering the supported encodings of the compression plugin per
session

In order not to leak these into other sessions, one keeps a registry
around as a session option. This will cascade into the request and
response encoding routines.
2021-03-05 19:04:09 +00:00
HoneyryderChuck
12d4885136 response body now holds the full options from the request 2021-03-05 19:04:09 +00:00