1936 Commits

Author SHA1 Message Date
HoneyryderChuck
48be2bd13a fix: proxy plugin loaad on http(s)_proxy envvar is working
the grep call was applied on an hash, instead of the keys, and was
therefore not picking up the proxy plugin when it should.
2022-01-07 12:26:26 +02:00
HoneyryderChuck
d3b36c5668 added support for HTTP/2 proxy by simplifying the overall http proxy implementation 2022-01-07 12:26:26 +02:00
HoneyryderChuck
1343c74e31 fixing overwriting connection #transition, which wasn't taking tcp connect on proxy errors 2022-01-07 12:26:26 +02:00
HoneyryderChuck
f3d50e6a06 fix doc typos 2022-01-02 23:38:38 +02:00
HoneyryderChuck
0e9823158a bumped version to 0.18.5 v0.18.5 2022-01-02 23:31:43 +02:00
HoneyryderChuck
8dec7ed093 Merge branch 'ruby-3.1' into 'master'
adding ruby 3.1 to CI

See merge request honeyryderchuck/httpx!187
2022-01-02 20:55:03 +00:00
HoneyryderChuck
c7ee489c78 Merge branch 'issue-176' into 'master'
fix: HTTP/1.1 pipeline disable out of consumption loop

Closes #176

See merge request honeyryderchuck/httpx!185
2022-01-02 20:36:45 +00:00
HoneyryderChuck
ce1033bc0f Merge branch 'issue-177' into 'master'
fix: use passed host header as authority for HTTP/2

Closes #177

See merge request honeyryderchuck/httpx!186
2022-01-02 20:36:33 +00:00
HoneyryderChuck
0fcb55d502 fixed origin uri handling, to make it still quack like a URI::HTTP on uri 0.11 2022-01-02 22:32:54 +02:00
HoneyryderChuck
e0b847585e adding ruby 3.1 to CI 2021-12-31 19:13:34 +02:00
HoneyryderChuck
9596f5a5e1 fix: use passed host header as authority for HTTP/2
"host" header is considered an invalid HTTP/2 header, and I think that,
although we log it, the parser does not send it. However, this is
equivalent to a silent fail. We'll be then copying cURL's behaviour,
i.e. use the user-set "host" as ":authority", but we'll be logging this
behaviour, in case it changes in the future.

Fixes #177
2021-12-31 18:13:59 +02:00
HoneyryderChuck
be4bdb3cf5 fix: HTTP/1.1 pipeline disable out of consumption loop
pipeline disabling may happen on the `handle_error` phase outside of the
main consumption loop, so the `throw` call is out of context, and needs
to be guarded against. we're alreaady doing in the handler, so I'm just
quick-fixing it fow now.

Fixes #176
2021-12-31 17:54:44 +02:00
HoneyryderChuck
dbd2ab66ec doc fixes 2021-12-29 15:06:11 +02:00
HoneyryderChuck
87bb4a4994 bumped to 0.18.4 v0.18.4 2021-12-27 01:40:05 +02:00
HoneyryderChuck
a3a6324d18 Merge branch 'issue-173' into 'master'
alt-svc: yield alt origin as either http or https url, pass proto as an option

Closes #173

See merge request honeyryderchuck/httpx!184
2021-12-26 23:28:09 +00:00
HoneyryderChuck
d4bc21d65c alt-svc: yield alt origin as either http or https url, pass proto as an option 2021-12-27 01:14:33 +02:00
HoneyryderChuck
0878b99946 Merge branch 'issue-170' into 'master'
fix: support webmock retries / response sequences

Closes #170

See merge request honeyryderchuck/httpx!179
2021-12-26 22:06:37 +00:00
HoneyryderChuck
f56619efba fix: support webmock retries / response sequences
The previous implementation of the webmock plugin bypassed the
connection layer, which made it ignore key plugins like the retries
plugin. The whole plugin was redone so that it'd hook at the connection
level when piping requests.

A small difficulty was on how to handle the connection initialization
state when needing to unmock, as name resolving triggers before requests
are piped. A hack with a #once callback was implemented.

Fixes #170
2021-12-26 23:52:10 +02:00
HoneyryderChuck
3b882f59d6 Merge branch 'issue-171' into 'master'
fix: remove mime-types support for mime type file detection

Closes #171

See merge request honeyryderchuck/httpx!180
2021-12-24 11:42:39 +00:00
HoneyryderChuck
11f6bb401f Merge branch 'issue-172' into 'master'
faraday: added support for #on_data

Closes #172

See merge request honeyryderchuck/httpx!182
2021-12-24 11:42:26 +00:00
HoneyryderChuck
dea70478ea faraday: added support for #on_data 2021-12-22 16:01:48 +02:00
HoneyryderChuck
be5300ea4a fix: remove mime-types support for mime type file detection
mime-types uses filenames, which is a terrible and inaccurate strategy
to infer mime types (example: "a.mp4" can be "application/mp4" or
"audio/mp4" before it's "video/mp4").

Added support for `marcel` and `filemagic`, which both support magic
bytes detection strategy.

Fixes #171
2021-12-18 00:47:19 +00:00
HoneyryderChuck
17b3b6c1d1 bumped version to 0.18.3 v0.18.3 2021-12-14 20:19:20 +00:00
HoneyryderChuck
9adf8fbef9 Merge branch 'fix-webmock-multipart-body' into 'master'
fix: request bodies eager-loaded from enumerables yield duped partial strings

See merge request honeyryderchuck/httpx!178
2021-12-14 20:02:36 +00:00
HoneyryderChuck
c8d32b7363 fix: request bodies eager-loaded from enumerables yield duped partial
strings

An error was observed while looking at webmock integration, where
requests formed via the multipart plugin where returning an empty string
as body. The issue was caused by an optimization on multipart encoder,
which reuses the same buffer when reading chunks. Unfortunately, these
cannot be yielded the same way via IO.copy_stream, as the same (cleared)
buffer will be used to generate the eager-loaded body chunks.
2021-12-14 19:12:58 +00:00
HoneyryderChuck
5187bc95b5 added missing images to blog post 2021-12-12 12:29:08 +00:00
HoneyryderChuck
facffe7644 bumped version to 0.18.2 v0.18.2 2021-12-09 17:53:41 +00:00
HoneyryderChuck
938d69aed7 Merge branch 'gh-issue-3' into 'master'
do not loop forever if there are no connections to listen nor any timer

See merge request honeyryderchuck/httpx!177
2021-12-09 17:44:08 +00:00
HoneyryderChuck
edc2c4e6c4 do not loop forever if there are no connections to listen nor any timer
to wait for.

Timeout calculation may trigger errors which lead to connection
unregistering, such as tital timeout errors. In such a case, we can end
up in a state where #select gets called with no timeout and no
selectable connections.

https://github.com/HoneyryderChuck/httpx/issues/3
2021-12-09 15:02:32 +00:00
HoneyryderChuck
8e77f0464a bumping version to 0.18.1 v0.18.1 2021-11-23 10:32:12 +00:00
HoneyryderChuck
ab70f6a586 total timeout call should bubble up exception, not timeout value 2021-11-19 23:03:08 +00:00
HoneyryderChuck
589e47e98b Merge branch 'issue-160' into 'master'
do not ignore goaway with no errors sent by the server

Closes #160

See merge request honeyryderchuck/httpx!176
2021-11-19 22:45:01 +00:00
HoneyryderChuck
f3cff86775 cleaning up state within an http2 connection receiving a goaway, to properly mark it to be close; this will prevent unfinished pending requests to fall in the same connection, resulting in an unrecoverable internal state error 2021-11-19 16:24:50 +00:00
HoneyryderChuck
0f80baf351 retries plugin: make errorless http2 connnection goaway a retryable error 2021-11-18 18:12:32 +00:00
HoneyryderChuck
5a61586fd5 do not ignore goaway with no errors sent by the server, let the connection go down
raise a specific error for this, which will make it easier to rescue
from.
2021-11-18 18:07:12 +00:00
HoneyryderChuck
c7d73d09b8 coalescing: do not try to use a self-signed certificate for coalescing verification purposes 2021-11-17 21:35:31 +00:00
HoneyryderChuck
f31b06c150 improving servlet layer to be able to quickly build an HTTP2 test server 2021-11-17 21:34:16 +00:00
HoneyryderChuck
d25b61fa00 set mfa required in gemspec 2021-11-16 15:07:08 +00:00
HoneyryderChuck
7e73c3a066 Merge branch 'issue-159' into 'master'
Fix for HTTP/1 logging on pipelining

Closes #159

See merge request honeyryderchuck/httpx!175
2021-11-16 14:57:06 +00:00
HoneyryderChuck
17d05e987d fixed cond around waiting for localstack to come up again 2021-11-14 02:56:32 +00:00
HoneyryderChuck
72924e420b fixing HTTP/1 logging on pipelining, where the buffered requests would appear in the second request log 2021-11-14 02:56:32 +00:00
HoneyryderChuck
b18b715818 some small rbs improvemments 2021-11-13 11:09:29 +00:00
HoneyryderChuck
8a8e0998df bumping version to 0.18.0 v0.18.0 2021-10-02 23:53:07 +01:00
HoneyryderChuck
34405df522 skipping vary test 2021-10-02 01:21:40 +01:00
HoneyryderChuck
11a02946ad Merge branch 'issue-122' into 'master'
Response Cache plugin

Closes #122

See merge request honeyryderchuck/httpx!171
2021-10-01 23:52:10 +00:00
HoneyryderChuck
b2a5371fe2 fix missing var 2021-10-02 00:27:37 +01:00
HoneyryderChuck
8f00539d6d bigger delta overall for timer-based tests 2021-10-02 00:19:53 +01:00
HoneyryderChuck
a3ee98f410 implementation of the response cache plugin 2021-10-01 23:53:21 +01:00
HoneyryderChuck
911c803d83 added test for vary header handling 2021-10-01 23:38:38 +01:00
HoneyryderChuck
a60fde07d6 added plugin tests, and the plugin body 2021-10-01 23:38:38 +01:00