1785 Commits

Author SHA1 Message Date
HoneyryderChuck
b13e265bd4 Merge branch 'openssl-rbs' into 'master'
more rbs + improvements

See merge request honeyryderchuck/httpx!162
2021-08-31 13:26:43 +00:00
HoneyryderChuck
cdcbf14675 few sig changes (more assertive) 2021-08-31 13:50:29 +01:00
HoneyryderChuck
74dfb18ed3 few extra changes to appease the type checker 2021-08-31 13:50:29 +01:00
HoneyryderChuck
b92829d025 do not needlessly forward method used only once 2021-08-31 13:50:29 +01:00
HoneyryderChuck
b9339a12ae targeting rbs with openssl 2021-08-31 13:50:29 +01:00
HoneyryderChuck
82953f7fe6 Merge branch 'drop_response_body_finalizer' into 'master'
Remove response body finalizer

See merge request honeyryderchuck/httpx!161
2021-08-30 17:28:57 +00:00
ojab
aa3be21c89
Remove response body finalizer
it's unnecessary, see discussion in
https://gitlab.com/honeyryderchuck/httpx/-/merge_requests/159
2021-08-30 14:07:36 +00:00
HoneyryderChuck
f18da78832 Merge branch 'blog' into 'master'
post

See merge request honeyryderchuck/httpx!160
2021-08-30 09:13:40 +00:00
HoneyryderChuck
d4a05a281f enable tests and coverage in blog branch 2021-08-27 12:34:20 +01:00
HoneyryderChuck
84f5c04412 blog post: tensorflow-serving in ruby 2021-08-27 12:32:07 +01:00
HoneyryderChuck
a5a2f0d8f8 blog: added support for meta keywords, changed a bit of the HTML header 2021-08-27 12:32:07 +01:00
HoneyryderChuck
a4649d90a7 Merge branch 'fix-iproute' into 'master'
innstallig iproute2, as it's no longer part of distro

See merge request honeyryderchuck/httpx!158
2021-08-17 16:10:01 +00:00
HoneyryderChuck
2cb3c395a8 innstallig iproute2, as it's no longer part of distro 2021-08-17 16:58:42 +01:00
HoneyryderChuck
e435dd0534 prevent multiple declarations of the host header 2021-08-17 14:09:21 +01:00
HoneyryderChuck
6a69f1cc84 Merge branch 'issue-132' into 'master'
Response decoders

Closes #132

See merge request honeyryderchuck/httpx!157
2021-08-10 15:36:43 +00:00
HoneyryderChuck
f520785572 added content-type filtering to decoders 2021-08-10 13:50:34 +01:00
HoneyryderChuck
c7f177adbb added regexp extensions where using match? 2021-08-10 11:25:36 +01:00
HoneyryderChuck
2a5c429dbd improvement in Session#request, one of the main APIs 2021-08-10 11:10:45 +01:00
HoneyryderChuck
8ded86cec6 improving sigs for new components 2021-08-10 11:10:45 +01:00
HoneyryderChuck
e19041aaad no ned to call Kernel directly (at least, not anymore) 2021-08-10 11:10:45 +01:00
HoneyryderChuck
c4f5362156 making responses coercable to string 2021-08-10 11:10:45 +01:00
HoneyryderChuck
20db082db2 changing proc to lambda (just because of rbs) 2021-08-10 11:10:45 +01:00
HoneyryderChuck
802c47a037 multipart decoding: fail if no boundary found in header 2021-08-10 11:10:45 +01:00
HoneyryderChuck
e1ee8c69dc proxy: fixing proxy resolve error filtering to also work with system resolver 2021-08-10 11:10:45 +01:00
HoneyryderChuck
6b61b8ccdb fixing signatures
also adding some checks on code, in order for steep to stop complaining
about potential nil returns.
2021-08-10 10:28:58 +01:00
HoneyryderChuck
556c94a575 added multipart decooder, which overtakes on Response#form for multipart payloads 2021-08-09 15:54:25 +01:00
HoneyryderChuck
f2d3c1f09b added Response#form (supports only x-www-urlencoded for now) 2021-08-09 15:54:25 +01:00
HoneyryderChuck
a85828d0d5 added Response#json 2021-08-09 15:54:24 +01:00
HoneyryderChuck
e5a120111c added tests for json and form (also multipart) decoders 2021-08-09 15:54:24 +01:00
HoneyryderChuck
c9de63d4cd bumped version to 0.16.1 2021-08-09 15:54:16 +01:00
HoneyryderChuck
eed79d0de3 Merge branch 'issue-145' into 'master'
bugfix: fixed native resolver timeout when dealing with absolute DNS names

Closes #145

See merge request honeyryderchuck/httpx!156
2021-08-09 13:14:05 +00:00
HoneyryderChuck
582447f10e bugfix: fixed native resolver timeout when dealing with absolute DNS
names

DNS answers are decoded using `resolv` internal structures. In this
particular case, we were using `Resolv::DNS::Name#to_s` to infer the
query dns name an answer refers to. This failed, because, as per
documentaation:

```ruby
p Resolv::DNS::Name.create("x.y.z.").to_s #=> "x.y.z"
p Resolv::DNS::Name.create("x.y.z").to_s #=> "x.y.z"
```

this caused issues when marking the DNS resolving as done. As a fix, I
applied the same logic from `Resolv::DNS::Name#inspect`. which correctly
prints absolute names.

Fixes #145
2021-08-09 13:36:49 +01:00
HoneyryderChuck
5eb9afd6e9 Merge branch 'reduce-options-allocations' into 'master'
performance improvements

See merge request honeyryderchuck/httpx!155
2021-08-05 22:41:26 +00:00
HoneyryderChuck
f9c17af6f3 save against file handle from system resolve being closed abruptly 2021-08-05 23:29:49 +01:00
HoneyryderChuck
48a2d82c34 http2 connection: removed interests calculation traversing requests
the traversal seems unnnecessary, given the subsequent cheaper checks. A
request with a stream will always be writable unless it's done, or is
expecting a 1xx response; however, there'll be drains in place, and
that's a cheaper check.
2021-08-05 22:52:58 +01:00
HoneyryderChuck
59755d7d01 connection: avoid calculating interests when there was nothing that could have changed the result 2021-08-05 22:51:16 +01:00
HoneyryderChuck
63c39a4032 fixed respond_to_missing? sig 2021-08-05 15:03:50 +01:00
HoneyryderChuck
65261217b1 optimization for calculation whether parser is empty
This avoids traversing all requests in the parser. this is possible for
HTTP/1.1 because, given that requests are sequentially concluded, one
can get away with checking only first and last request state.
2021-08-05 15:03:49 +01:00
HoneyryderChuck
3d549817cb optimization on build_request to reduce Options object allocations on
multi-request calls

request options already get aggregated in #build_requests. this
optimization removes the Options object rebuild for each request,
thereby sharing the same across concurrent requests.

this is possible because, although #build_request is public, we document
it only with passing hash of options, never an Options object. This
would probably result in errors.
2021-08-05 15:03:49 +01:00
HoneyryderChuck
cc02679b80 Options#to_hash: avoid intermediate array, directly assign to final hash 2021-08-05 15:03:49 +01:00
HoneyryderChuck
9d60b23aad fixed parser tests (those lines never trigger) 2021-08-05 15:03:49 +01:00
HoneyryderChuck
74f355314d removing reliance on regexp ops in http1 parser 2021-08-05 15:03:49 +01:00
HoneyryderChuck
29105854e3 do not pass around options after requests get initialized, instead rely on rquest options 2021-08-05 15:03:49 +01:00
HoneyryderChuck
b126938a65 skip options merge if the options to merge are already included 2021-08-04 16:30:20 +01:00
HoneyryderChuck
c8276f94f4 added tests for options to track allocation optimizations 2021-08-04 13:48:11 +01:00
HoneyryderChuck
d23be82b7e bumping versio to 0.16.0 v0.16.0 2021-08-04 00:16:28 +01:00
HoneyryderChuck
14bdb5327f Merge branch 'issue-143' into 'master'
make Response#to_s non-destructive, and keep the body around

Closes #143

See merge request honeyryderchuck/httpx!153
2021-08-02 18:15:54 +00:00
HoneyryderChuck
c8719435c7 updating jruby image 2021-08-01 14:43:23 +01:00
HoneyryderChuck
953f2d0d13 fixed calculation of connection header when explicit connection header
is passed

also, fixed the test which was relying on the previous one-time-to_s
behaviour of responnse bodies.
2021-08-01 00:38:40 +01:00
HoneyryderChuck
ba742847f7 fixing grpc dependency on body being closed when buffered 2021-07-24 04:00:19 +01:00