97 Commits

Author SHA1 Message Date
HoneyryderChuck
232b94590a grpc: added client and server cancellation request support 2021-05-07 16:55:48 +01:00
HoneyryderChuck
7a60346bf7 Added trailer header support for writing requests
Request can also add their own trailer headers, either explicitly via
Request#trailers , or via request lifecycle callbacks
2021-05-06 10:38:20 +01:00
HoneyryderChuck
837c7ddf17 allowing .deflate to be called synchronously 2021-05-06 10:38:20 +01:00
HoneyryderChuck
1cf6e5aac7 new option: origin
by setting the origin, one can pass relative paths to httpx, which will
be appended when building the request.
2021-05-04 20:09:50 +01:00
HoneyryderChuck
3e7dfe3e7f stream: moved StreamResponse to the HTTPX namespace 2021-05-04 20:09:50 +01:00
HoneyryderChuck
e436c4fa04 options: always load plugins in the .configure callback 2021-05-04 20:09:50 +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
bf0ec99794 removed the timeout class 2021-04-08 17:34:19 +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
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
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
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
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
48961d6c64 do not select on an http/2 connection with no ongoing comms
It was observed that, during a request done via a DoH resolve, the
resolver connection is left in the selector, despite already having
resolved the name, until the whole transfer is done. This is
inefficient, as we're not expected to use it again.

Fixed by improvinng the interest calculation of an HTTP/2 connection; if
the connection doesn't have anything to write. and there aren't  any
inflight streams nor pings, connection won't be listened on.
2021-02-21 16:09:45 +00:00
HoneyryderChuck
75c9f08964 added test for trailer headers (http/1 only) 2021-02-19 17:13:19 +00:00
HoneyryderChuck
4bab923f25 experimental optimizations in the connection call loop.
skip entering the read/write hot loops when the connection interests
specifically say so. this led to a overhaul of how interests are
calculated.
2021-02-15 17:20:41 +00:00
HoneyryderChuck
ff87177a4a added module signatures 2021-02-06 16:24:35 +00:00
HoneyryderChuck
db036aaefa protocol: passing protocol specific headers as a request callback 2021-02-02 18:33:24 +00:00
HoneyryderChuck
7fa283097d added signatures to new modules 2021-01-13 12:27:13 +00:00
HoneyryderChuck
c2a85311d4 fixed signature of expects\? 2021-01-09 17:28:02 +00:00
HoneyryderChuck
dbc12a91b5 importing tests from webmock 2021-01-01 16:56:36 +00:00
HoneyryderChuck
d6465ce433 by passing arity to curry calls, methods can be type-checked now 2020-12-19 00:26:05 +00:00
HoneyryderChuck
65f5e86f3f allowing nested params also when posting multipart requests 2020-12-10 13:46:57 +00:00
HoneyryderChuck
0bb18ad500 added urlformencoder which encodes form data the way rack is used to, when nested 2020-12-10 01:07:18 +00:00
HoneyryderChuck
7ba354bcac typing the resolvers 2020-12-09 14:27:27 +00:00
HoneyryderChuck
7bd9f9a33f typing the connection pool 2020-12-08 16:47:39 +00:00
HoneyryderChuck
392dadcb78 typing the connection parsers 2020-12-07 17:46:45 +00:00
HoneyryderChuck
beb0a82baa typing selector and connection 2020-12-07 16:30:39 +00:00
HoneyryderChuck
a675fde7dd enable singleton usage in rbs sigs 2020-12-02 01:30:38 +00:00
HoneyryderChuck
201591e9fe added test for the socks5 non-happy path 2020-12-02 01:30:38 +00:00
HoneyryderChuck
37999cc39e improved testing of body transcoder 2020-12-02 01:30:38 +00:00
HoneyryderChuck
7a5353ea90 fixed signing of the stream session request 2020-11-25 11:54:51 +00:00
HoneyryderChuck
cb3e57e10d fixing log_exception signature 2020-11-24 16:38:46 +00:00
HoneyryderChuck
1e21c33da0 fixinng the signatures for the last rbs upstream 2020-11-24 00:42:54 +00:00
HoneyryderChuck
cbfb5c968e moving domain_name module to core httpx, as the punycode IDN translation will be needed at this layer 2020-11-07 01:34:48 +00:00
HoneyryderChuck
5f735cc6f5 Merge branch 'issue-50' into 'master'
rate limiter plugin

See merge request honeyryderchuck/httpx!99
2020-11-06 17:25:06 +00:00
HoneyryderChuck
267f320fe0 updated signatures to use latest interface additions in rbs 2020-11-04 01:21:28 +00:00
HoneyryderChuck
048501e940 adding and integrating the new cookie modules for: store, jar, cookie, and domain name 2020-11-04 00:32:01 +00:00
HoneyryderChuck
959429b386 improved cookies testing, to test also the array-of-cookie-hashes case; does not accept a string anymore, as besides untested, it wasn't working properly 2020-11-03 16:33:11 +00:00
HoneyryderChuck
1ad2e9cbcf implemented the rate limiter plugin 2020-10-31 14:15:28 +00:00
HoneyryderChuck
805096b721 signing the http1 parser as well 2020-10-30 16:19:18 +00:00
HoneyryderChuck
e02e8029ad made encoder API more consistent across request body encoders 2020-10-30 16:19:18 +00:00
HoneyryderChuck
b24ad8b605 refactored the compression plugins to use inflater/deflater API
during the typing sessions, it was clear that there was some confusion
around the decoder/encoder concept as well as API convolution, i.e. zlib
implementation details leaked to the main compression module.

Therefore, interfaces for Deflater/Inflater were build from the ground
up, and the modules were rewritten accordingly.
2020-10-30 16:19:18 +00:00
HoneyryderChuck
936a8533a7 initial signatures for typed ruby 2020-10-27 17:00:44 +00:00