1117 Commits

Author SHA1 Message Date
HoneyryderChuck
30feb4c004 bumped version to 0.15.0 2021-06-18 17:23:38 +01:00
HoneyryderChuck
34c6562469 enabling pattern matching only for 3.0.0 2021-06-17 18:09:00 +01:00
HoneyryderChuck
6229e23765 allow headers to be pattern-matched as well 2021-06-17 15:29:09 +01:00
HoneyryderChuck
f7ecc145e6 added pattern-matching support for responses 2021-06-12 02:44:16 +01:00
HoneyryderChuck
0c7712ca88 using punycode name as the authority in the headers, which is actually a bugfix 2021-06-11 18:51:57 +01:00
HoneyryderChuck
4df2363cc5 providing strategy for punycode translation, using idnx when possible, falling back otherwise 2021-06-11 18:27:40 +01:00
HoneyryderChuck
e3468fb3c4 isolating the punycode module 2021-06-11 14:44:07 +01:00
HoneyryderChuck
e18b616a35 bumping version to 0.14.5 2021-06-03 17:29:52 +01:00
HoneyryderChuck
a9010c5837 bugfix: reset handshake when resetting the connection, as to let the negotiation flow on reconnect 2021-06-02 23:05:36 +01:00
HoneyryderChuck
7326b07bee fixing 0.14.4's bug again, by making the connection header more
predictable

* it's keep-alive if the connection is persistent and the conn requests
  have been exhausted;
* it's closed otherwise
2021-06-02 22:57:52 +01:00
HoneyryderChuck
06f1a041e6 bugfix: fixing clogged connection requests after a jumbo one
In an already initiated connection, when piping multiple requests to be
sent concurrently, a case happened where the first filled the write
buffer, leaving the second in the connection pending queue; the initial
request would finish without ever taking the subsequent request from the
pending queue, leaving the connection hanging.

this was fixed by making flushing the queue part of the #consume work.
2021-06-02 18:44:05 +01:00
HoneyryderChuck
d52f22230c bumping version to 0.14.4 2021-06-01 10:09:58 +01:00
HoneyryderChuck
3a904ffcd0 bugfix: http1 was miscalculating the last possible request for a given connection, and freezing it 2021-06-01 10:09:58 +01:00
HoneyryderChuck
bf8c265756 skip reads if no interests, or no io whatsoever 2021-05-31 13:56:16 +01:00
HoneyryderChuck
a49fcc65f5 call #consume in a specific close_handshake instead 2021-05-31 13:55:18 +01:00
HoneyryderChuck
1907a00d19 fixing the select loop: when closed selectables are discarded, one has to reselect them from start, otherwise it's a loop 2021-05-31 13:29:11 +01:00
HoneyryderChuck
a80b9d84b9 sending goaway frame with settings_timeout code when timeout happens at
handshake time

The current timeout is set for settings timeout; a specific goaway is
crafted when handling timeout errors in the parser at handshake time.
2021-05-30 00:58:43 +01:00
HoneyryderChuck
5cfb494d50 allow parsers to define a connection timeout, and channge it via callback 2021-05-30 00:57:54 +01:00
HoneyryderChuck
b569cc9984 adding the settings timeout as an option, as well as a specific error 2021-05-30 00:53:37 +01:00
HoneyryderChuck
26eb72c170 Merge branch 'issue-126' into 'master'
NTLM Authenticationn Plugin

Closes #126 and #121

See merge request honeyryderchuck/httpx!135
2021-05-28 15:36:27 +00:00
HoneyryderChuck
77fbfca33e simplified and unified the authentication strategies code a bit more 2021-05-28 13:40:11 +01:00
HoneyryderChuck
31a6baf69f bumped to 0.14.3 2021-05-28 12:44:52 +01:00
HoneyryderChuck
3628db1495 removing options from Call (unneeded) 2021-05-28 12:15:09 +01:00
HoneyryderChuck
bb7f348a2c improving digest auth plugin, and aligning it with ntlm auth plugin
* both now only accept one request at a time
* code is more similar
2021-05-28 12:15:09 +01:00
HoneyryderChuck
7c4bd3e7a1 bugfix: Connection: close is being set 2 times, and leaking into
redirect follows

this means that http -> https redirects carries over that header, which
is invalid there
2021-05-28 12:05:41 +01:00
HoneyryderChuck
df489676ac adding ntlm auth plugin 2021-05-27 19:11:15 +01:00
HoneyryderChuck
393c4adfd3 bumped to 0.14.2 2021-05-27 18:25:38 +01:00
HoneyryderChuck
c61007ba0f do not forget the filename in those multipart spoofs 2021-05-27 17:53:45 +01:00
HoneyryderChuck
357344f2f9 bumped to 0.14.1 2021-05-27 17:00:00 +01:00
HoneyryderChuck
35df9c7683 fix: allow setting arbitrary content types for multipart requests
very useful when testing spoof requests.
2021-05-27 16:50:38 +01:00
HoneyryderChuck
8e1e6b3c6a set_protocol_headers now returns extra fields, that can be yielded in the handler, instead of merged into the request
this implicit mutation of the request was causing issue in insecure
redirects, which kept the same HTTP/2 specific headers in HTTP/1
payloads
2021-05-26 18:13:53 +01:00
HoneyryderChuck
e5a8e76d62 allow Headers#each to be passed extra headers to yield 2021-05-26 18:13:53 +01:00
HoneyryderChuck
5d4ac62bf2 bumping version to 0.14.0 2021-05-22 16:19:52 +01:00
HoneyryderChuck
2c3280b6d0 Merge branch 'issue-119' into 'master'
new option: origin

See merge request honeyryderchuck/httpx!131
2021-05-22 14:23:05 +00:00
HoneyryderChuck
44106325d5 bugfix: do not set new session callbacks on connections which already have them
a subtle bug surfaced when trying multiple individual requests on the
same persistent session, where the connection was being removed from the
watchable connections after each request, but kept in the pool; on the
next request, it would set the same session callbacks; this would go on
and on until connections would get exhausted, after which all of these
callbacks would have to be called.

fixed by having a new callbacks interface, #only, which discards
existing callbacks by type, thereby ensuring there's only one of the
kind.
2021-05-21 18:26:54 +01:00
HoneyryderChuck
3eddfdb509 bugfix: do not blindly sum origins when merging connections
so that there are no repeated entries.

Fixes #125
2021-05-21 18:21:14 +01:00
HoneyryderChuck
ff5ed7be59 added support for TLS channel credentials 2021-05-20 00:59:14 +01:00
HoneyryderChuck
b09aef506e wrapping all responses from the grpc plugin in a GRPC::Call
calls are proxies which can access response metadata as it arrives. For
instance, it's possible to now get metadata (which are http headers)
before the response is fully streamed. #trailing_metadata will also be
empty until the response has been fully processed.

This builds on top of the stream plugin improvements foundation.
2021-05-20 00:11:26 +01:00
HoneyryderChuck
441716a5ac fixing double-response for streams
there was a long-standing buggy workaround, whereas in stream-mode, when
there was no response yet to query from, a synchronous request would be
fired. This would break when under event streams, so we had to document
this as "make sure that...".

This fixes it by implementing a general session API convention, which
separates the step of sending the requests, from waiting for its
receival. And, given that the request knows when the response is
available, we can actually "tick until response".

This might be used in the future to refactor the way we handle the
responses, which buffer the full payload by default, instead of reading
from the connection at will.
2021-05-20 00:11:26 +01:00
HoneyryderChuck
a1d09889ff adding grpc subfolder, extracting Message module, adding a Call abstraction 2021-05-10 12:38:41 +01:00
HoneyryderChuck
bbe5c2d114 added support for grpc deadline options 2021-05-07 16:55:48 +01:00
HoneyryderChuck
02dfb9073e allow connections to cleanup refused streams 2021-05-07 16:55:48 +01:00
HoneyryderChuck
232b94590a grpc: added client and server cancellation request support 2021-05-07 16:55:48 +01:00
HoneyryderChuck
949f073738 added test to prove support for requests cancelled from server 2021-05-06 10:38:20 +01:00
HoneyryderChuck
b73882210f bugfix: do not reset content-length for compressed body if the body is streamable (not only chunked) 2021-05-06 10:38:20 +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
fd31d9de0d allow for compression of grpc messages; testing using grpc 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
4d0750c950 stream: delegate to real response if available, only then generate a brand new one 2021-05-05 13:18:47 +01:00
HoneyryderChuck
5772f83149 added client and server stream tests and implementation
bidi calls also "just" work (tm)
2021-05-05 13:18:47 +01:00