433 Commits

Author SHA1 Message Date
HoneyryderChuck
dbdf7b95a2 added initial test and implementation of a quasi-unary interface 2021-05-04 20:09:50 +01:00
HoneyryderChuck
ae4b7545b2 added the first grpc test, initially using the gprc gem stub client 2021-04-20 19:04:19 +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
bf0ec99794 removed the timeout class 2021-04-08 17:34:19 +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
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
00faafddc9 added tests around the tcp connect errors 2021-03-11 17:58:24 +00:00
HoneyryderChuck
e34c998f5a removing weird synchronizes around the unix test server 2021-03-08 17:20:53 +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
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
e8ac876443 setting the upgrade handlers per session. 2021-03-07 16:18:44 +00:00
HoneyryderChuck
12d4885136 response body now holds the full options from the request 2021-03-05 19:04:09 +00:00
HoneyryderChuck
7fca78ad23 added custom upgrade plugin as example (for websockets) 2021-03-05 12:23:18 +00:00
HoneyryderChuck
a03e93e531 allow for oportunistic upgrades, such as the apache Upgrade: h2
this is achieved by a rework of the upgrade plugin, and the addition of
an h2 upgrade plugin. The idea is the following: if a response carries
an Upgrade header, and there's a handler for it, we should go for it.
The difference is:

* when the response is 101, this means that the negotiation must take
  place before the actual response comes in;
* when the response is 200, upgrading means reconnecting to the channel,
  and assume the new protocol for subsequent requests only.
2021-03-05 12:23:17 +00:00
HoneyryderChuck
72a397b841 added (and fixing bug for) test of subsequent request on upgraded
connection

After the connection has been upgraded and session is kept open,
subsequent requests were still trying to upgrade it. This fixes it by
marking the connection as upgraded, and falling back to normal
behaviour when it is.
2021-03-05 12:23:07 +00:00
HoneyryderChuck
a77091f9e7 refactor the h2c plugin on top of the upgrade plugin
By setting the h2c protocol handler, the rest became much simpler.

Formatting the upgrade request is a matter for the sub-plugin.
Therefore, the specific h2c request upgrade headers are built-in there.
2021-02-28 03:06:03 +00:00
HoneyryderChuck
ee505a92e5 testing altsvc lookups directly 2021-02-21 16:09:45 +00:00
HoneyryderChuck
825dcf867b resolver test: status might be an exception message 2021-02-19 17:13:19 +00:00
HoneyryderChuck
75c9f08964 added test for trailer headers (http/1 only) 2021-02-19 17:13:19 +00:00
HoneyryderChuck
edfd92ea60 added test for to_s rep of error response (i.e. must contain the canonical message class def) 2021-02-19 16:42:39 +00:00
HoneyryderChuck
b6c94f1702 added test for unsupported charset in response 2021-02-18 10:43:48 +00:00
HoneyryderChuck
5c4cf4dd9e regression test for issue fixed in v0.11.2
added a test for parsing an RFC-2616-compliant expires date in the
cookie, which fails without the fix.
2021-02-17 01:23:16 +00:00
HoneyryderChuck
a2895d456f regression test for bug fixed in 0.11.3
created a test server which removes the content-length. Taken extra
condition into account, that the close might manifest itself while
selecting on the socket; at that point we're out of the consumption
loop, so better not to deal with throwing :called
2021-02-17 00:55:05 +00:00
HoneyryderChuck
7082f63e4e more explicit error message in multipart test 2021-02-16 18:27:05 +00:00
HoneyryderChuck
10bb2fbfd2 removed test logging 2021-02-07 15:52:28 +00:00
HoneyryderChuck
9ca4cbe68b yield error response on frame protocol errors for a given stream
stream HTTP/2 framing errors were being yielded directly into the connection. This had
the issue of not closing the request, thereby causing an infinite loop
when closing the connection. This seemed to be the issue in CI.
2021-02-07 15:16:26 +00:00
HoneyryderChuck
5a9277d8f4 logging multipart retry test, this seems to be the onne hanging from time to time... 2021-02-06 16:34:47 +00:00
HoneyryderChuck
1724c0f913 waiting for localstack to be up before running the tests in CI 2021-02-06 16:24:35 +00:00
HoneyryderChuck
ef8ad355e9 show the header in the logs when aws sigv4 fails 2021-02-06 16:24:35 +00:00
HoneyryderChuck
d9326ac027 fixing the disable of kee-alives when setting max-concurrent-connections
to 1

A check was introduced limiting the number of requests send at once.
However. the connection header was set to "close" as well, because
the accounting involved the number of concurrent connections allowed.
This is now fixed, by doing accounting separately.
2021-02-05 19:28:38 +00:00
HoneyryderChuck
d93de82639 do not assume that kwargs work as hash merges in older rubies 2021-02-03 12:52:22 +00:00
HoneyryderChuck
2875e81d16 testing against patched openssl version (and sending all artifacts to coverage job in CI) 2021-02-02 19:42:43 +00:00
HoneyryderChuck
ae1060157a changing the name of the plugin to aws_sdk_authentication, removing depenndency on s3 gem (only aws-sdk-core) 2021-02-02 18:33:24 +00:00
HoneyryderChuck
463dad46cb added the aws signature on top of the aws-sigv4 plugin, with support for using aws-sdk-core ready-made config 2021-02-02 18:33:24 +00:00
HoneyryderChuck
755b895b08 added initial aws sigv4 functional test 2021-02-02 18:33:24 +00:00
HoneyryderChuck
f415d1b66b added tests for aws sigv4 2021-02-02 18:33:24 +00:00
HoneyryderChuck
2866b78572 error message for sni is actually different, and I'm not sure how wasn't this being skipped 2021-01-31 15:51:34 +00:00
HoneyryderChuck
63f2026c1a disabling integrations for jruby 2021-01-31 15:51:34 +00:00
HoneyryderChuck
e253a70270 test bad certs errors with badssl.com instead 2021-01-31 15:51:34 +00:00
HoneyryderChuck
574a478cc8 changing indentation, registering TLS class 2021-01-31 15:51:34 +00:00
HoneyryderChuck
f7600d39d9 installing a 2020 version of openssl 2021-01-31 15:51:34 +00:00
HoneyryderChuck
2ecfde95d8 fixing cerfificate hostname validation callback 2021-01-31 15:51:34 +00:00
HoneyryderChuck
da21b4a342 updated verify certs callback, inorder only to verify the hostname when dealing with the leaf certificate 2021-01-31 15:51:34 +00:00
HoneyryderChuck
384d273715 new ssl option: :hostname -> the SNI hostname used in the TLS handshake 2021-01-31 15:51:34 +00:00
HoneyryderChuck
c5e3bda2d3 passing io doesn't work for ruby-tls 2021-01-31 15:51:33 +00:00
HoneyryderChuck
61afd85654 install libssl-dev in CI 2021-01-30 23:19:02 +00:00
HoneyryderChuck
b63e91b165 forgot that integrations tests do not run in parallel 2021-01-30 16:26:19 +00:00