http 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/http.gemspec +2 -2
- data/lib/http/version.rb +1 -1
- metadata +4 -79
- data/CHANGELOG.md +0 -267
- data/CONTRIBUTING.md +0 -26
- data/SECURITY.md +0 -17
- data/UPGRADING.md +0 -491
- data/sig/deps.rbs +0 -122
- data/test/http/base64_test.rb +0 -28
- data/test/http/client_test.rb +0 -739
- data/test/http/connection_test.rb +0 -1533
- data/test/http/content_type_test.rb +0 -190
- data/test/http/errors_test.rb +0 -28
- data/test/http/feature_test.rb +0 -49
- data/test/http/features/auto_deflate_test.rb +0 -317
- data/test/http/features/auto_inflate_test.rb +0 -213
- data/test/http/features/caching_test.rb +0 -942
- data/test/http/features/digest_auth_test.rb +0 -996
- data/test/http/features/instrumentation_test.rb +0 -246
- data/test/http/features/logging_test.rb +0 -654
- data/test/http/features/normalize_uri_test.rb +0 -41
- data/test/http/features/raise_error_test.rb +0 -77
- data/test/http/form_data/composite_io_test.rb +0 -215
- data/test/http/form_data/file_test.rb +0 -255
- data/test/http/form_data/fixtures/the-http-gem.info +0 -1
- data/test/http/form_data/multipart_test.rb +0 -303
- data/test/http/form_data/part_test.rb +0 -90
- data/test/http/form_data/urlencoded_test.rb +0 -164
- data/test/http/form_data_test.rb +0 -232
- data/test/http/headers/normalizer_test.rb +0 -93
- data/test/http/headers_test.rb +0 -888
- data/test/http/mime_type/json_test.rb +0 -39
- data/test/http/mime_type_test.rb +0 -150
- data/test/http/options/base_uri_test.rb +0 -148
- data/test/http/options/body_test.rb +0 -21
- data/test/http/options/features_test.rb +0 -38
- data/test/http/options/form_test.rb +0 -21
- data/test/http/options/headers_test.rb +0 -32
- data/test/http/options/json_test.rb +0 -21
- data/test/http/options/merge_test.rb +0 -78
- data/test/http/options/new_test.rb +0 -37
- data/test/http/options/proxy_test.rb +0 -32
- data/test/http/options_test.rb +0 -575
- data/test/http/redirector_test.rb +0 -639
- data/test/http/request/body_test.rb +0 -318
- data/test/http/request/builder_test.rb +0 -623
- data/test/http/request/writer_test.rb +0 -391
- data/test/http/request_test.rb +0 -1733
- data/test/http/response/body_test.rb +0 -292
- data/test/http/response/parser_test.rb +0 -105
- data/test/http/response/status_test.rb +0 -322
- data/test/http/response_test.rb +0 -502
- data/test/http/retriable/delay_calculator_test.rb +0 -194
- data/test/http/retriable/errors_test.rb +0 -71
- data/test/http/retriable/performer_test.rb +0 -551
- data/test/http/session_test.rb +0 -424
- data/test/http/timeout/global_test.rb +0 -239
- data/test/http/timeout/null_test.rb +0 -218
- data/test/http/timeout/per_operation_test.rb +0 -220
- data/test/http/uri/normalizer_test.rb +0 -89
- data/test/http/uri_test.rb +0 -1140
- data/test/http/version_test.rb +0 -15
- data/test/http_test.rb +0 -818
- data/test/regression_tests.rb +0 -27
- data/test/support/capture_warning.rb +0 -10
- data/test/support/dummy_server/encoding_routes.rb +0 -47
- data/test/support/dummy_server/routes.rb +0 -201
- data/test/support/dummy_server/servlet.rb +0 -81
- data/test/support/dummy_server.rb +0 -200
- data/test/support/fakeio.rb +0 -21
- data/test/support/http_handling_shared/connection_reuse_tests.rb +0 -97
- data/test/support/http_handling_shared/timeout_tests.rb +0 -134
- data/test/support/http_handling_shared.rb +0 -11
- data/test/support/proxy_server.rb +0 -207
- data/test/support/servers/runner.rb +0 -67
- data/test/support/simplecov.rb +0 -28
- data/test/support/ssl_helper.rb +0 -108
- data/test/test_helper.rb +0 -38
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 96efa876d9e4c3e5bb5100ab7862338a66b435d02a93e19075f2755a396acd7b
|
|
4
|
+
data.tar.gz: 3d91fccfe7a3e616dcb892fe416b6d1cffbadea286c492f524093ba1bfbdcdeb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de74b67fced0df2fc1093d4eb6969edddd43d2f7da5dec73d1ee54bff44712ac173ac3141e909c0f061ab3323820b9498028e5cebc11b74282feab70ef730d33
|
|
7
|
+
data.tar.gz: 361e27f92a887ccf3bd220188e60e9feed23cf750b4e13f8acb2085f0b9beddc381f504f3fa7c4bfe1ddb8dada2f0014141a3a3e2cf575681f39e23f39d8ef66
|
data/http.gemspec
CHANGED
|
@@ -26,10 +26,10 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.metadata["rubygems_mfa_required"] = "true"
|
|
27
27
|
|
|
28
28
|
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
|
|
29
|
-
extras = %w[
|
|
29
|
+
extras = %w[LICENSE.txt README.md sig/http.rbs] << File.basename(__FILE__)
|
|
30
30
|
|
|
31
31
|
ls.readlines("\x0", chomp: true).select do |f|
|
|
32
|
-
f.start_with?("lib/"
|
|
32
|
+
f.start_with?("lib/") || extras.include?(f)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
data/lib/http/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: http
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tony Arcieri
|
|
@@ -48,12 +48,8 @@ executables: []
|
|
|
48
48
|
extensions: []
|
|
49
49
|
extra_rdoc_files: []
|
|
50
50
|
files:
|
|
51
|
-
- CHANGELOG.md
|
|
52
|
-
- CONTRIBUTING.md
|
|
53
51
|
- LICENSE.txt
|
|
54
52
|
- README.md
|
|
55
|
-
- SECURITY.md
|
|
56
|
-
- UPGRADING.md
|
|
57
53
|
- http.gemspec
|
|
58
54
|
- lib/http.rb
|
|
59
55
|
- lib/http/base64.rb
|
|
@@ -116,87 +112,16 @@ files:
|
|
|
116
112
|
- lib/http/uri/normalizer.rb
|
|
117
113
|
- lib/http/uri/parsing.rb
|
|
118
114
|
- lib/http/version.rb
|
|
119
|
-
- sig/deps.rbs
|
|
120
115
|
- sig/http.rbs
|
|
121
|
-
- test/http/base64_test.rb
|
|
122
|
-
- test/http/client_test.rb
|
|
123
|
-
- test/http/connection_test.rb
|
|
124
|
-
- test/http/content_type_test.rb
|
|
125
|
-
- test/http/errors_test.rb
|
|
126
|
-
- test/http/feature_test.rb
|
|
127
|
-
- test/http/features/auto_deflate_test.rb
|
|
128
|
-
- test/http/features/auto_inflate_test.rb
|
|
129
|
-
- test/http/features/caching_test.rb
|
|
130
|
-
- test/http/features/digest_auth_test.rb
|
|
131
|
-
- test/http/features/instrumentation_test.rb
|
|
132
|
-
- test/http/features/logging_test.rb
|
|
133
|
-
- test/http/features/normalize_uri_test.rb
|
|
134
|
-
- test/http/features/raise_error_test.rb
|
|
135
|
-
- test/http/form_data/composite_io_test.rb
|
|
136
|
-
- test/http/form_data/file_test.rb
|
|
137
|
-
- test/http/form_data/fixtures/the-http-gem.info
|
|
138
|
-
- test/http/form_data/multipart_test.rb
|
|
139
|
-
- test/http/form_data/part_test.rb
|
|
140
|
-
- test/http/form_data/urlencoded_test.rb
|
|
141
|
-
- test/http/form_data_test.rb
|
|
142
|
-
- test/http/headers/normalizer_test.rb
|
|
143
|
-
- test/http/headers_test.rb
|
|
144
|
-
- test/http/mime_type/json_test.rb
|
|
145
|
-
- test/http/mime_type_test.rb
|
|
146
|
-
- test/http/options/base_uri_test.rb
|
|
147
|
-
- test/http/options/body_test.rb
|
|
148
|
-
- test/http/options/features_test.rb
|
|
149
|
-
- test/http/options/form_test.rb
|
|
150
|
-
- test/http/options/headers_test.rb
|
|
151
|
-
- test/http/options/json_test.rb
|
|
152
|
-
- test/http/options/merge_test.rb
|
|
153
|
-
- test/http/options/new_test.rb
|
|
154
|
-
- test/http/options/proxy_test.rb
|
|
155
|
-
- test/http/options_test.rb
|
|
156
|
-
- test/http/redirector_test.rb
|
|
157
|
-
- test/http/request/body_test.rb
|
|
158
|
-
- test/http/request/builder_test.rb
|
|
159
|
-
- test/http/request/writer_test.rb
|
|
160
|
-
- test/http/request_test.rb
|
|
161
|
-
- test/http/response/body_test.rb
|
|
162
|
-
- test/http/response/parser_test.rb
|
|
163
|
-
- test/http/response/status_test.rb
|
|
164
|
-
- test/http/response_test.rb
|
|
165
|
-
- test/http/retriable/delay_calculator_test.rb
|
|
166
|
-
- test/http/retriable/errors_test.rb
|
|
167
|
-
- test/http/retriable/performer_test.rb
|
|
168
|
-
- test/http/session_test.rb
|
|
169
|
-
- test/http/timeout/global_test.rb
|
|
170
|
-
- test/http/timeout/null_test.rb
|
|
171
|
-
- test/http/timeout/per_operation_test.rb
|
|
172
|
-
- test/http/uri/normalizer_test.rb
|
|
173
|
-
- test/http/uri_test.rb
|
|
174
|
-
- test/http/version_test.rb
|
|
175
|
-
- test/http_test.rb
|
|
176
|
-
- test/regression_tests.rb
|
|
177
|
-
- test/support/capture_warning.rb
|
|
178
|
-
- test/support/dummy_server.rb
|
|
179
|
-
- test/support/dummy_server/encoding_routes.rb
|
|
180
|
-
- test/support/dummy_server/routes.rb
|
|
181
|
-
- test/support/dummy_server/servlet.rb
|
|
182
|
-
- test/support/fakeio.rb
|
|
183
|
-
- test/support/http_handling_shared.rb
|
|
184
|
-
- test/support/http_handling_shared/connection_reuse_tests.rb
|
|
185
|
-
- test/support/http_handling_shared/timeout_tests.rb
|
|
186
|
-
- test/support/proxy_server.rb
|
|
187
|
-
- test/support/servers/runner.rb
|
|
188
|
-
- test/support/simplecov.rb
|
|
189
|
-
- test/support/ssl_helper.rb
|
|
190
|
-
- test/test_helper.rb
|
|
191
116
|
homepage: https://github.com/httprb/http
|
|
192
117
|
licenses:
|
|
193
118
|
- MIT
|
|
194
119
|
metadata:
|
|
195
120
|
homepage_uri: https://github.com/httprb/http
|
|
196
|
-
source_code_uri: https://github.com/httprb/http/tree/v6.0.
|
|
121
|
+
source_code_uri: https://github.com/httprb/http/tree/v6.0.1
|
|
197
122
|
bug_tracker_uri: https://github.com/httprb/http/issues
|
|
198
|
-
changelog_uri: https://github.com/httprb/http/blob/v6.0.
|
|
199
|
-
documentation_uri: https://www.rubydoc.info/gems/http/6.0.
|
|
123
|
+
changelog_uri: https://github.com/httprb/http/blob/v6.0.1/CHANGELOG.md
|
|
124
|
+
documentation_uri: https://www.rubydoc.info/gems/http/6.0.1
|
|
200
125
|
rubygems_mfa_required: 'true'
|
|
201
126
|
rdoc_options: []
|
|
202
127
|
require_paths:
|
data/CHANGELOG.md
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [6.0.0] - 2026-03-16
|
|
9
|
-
|
|
10
|
-
### Changed
|
|
11
|
-
|
|
12
|
-
- Merged `http-form_data` gem into the main `http` gem. The `HTTP::FormData`
|
|
13
|
-
module (including `Part`, `File`, `Multipart`, `Urlencoded`, and `CompositeIO`)
|
|
14
|
-
is now shipped directly with `http` instead of being a separate dependency.
|
|
15
|
-
The public API is unchanged.
|
|
16
|
-
|
|
17
|
-
### Fixed
|
|
18
|
-
|
|
19
|
-
- `Inflater` no longer raises `Zlib::BufError` when a response declares
|
|
20
|
-
`Content-Encoding: gzip` (or deflate) but the body is not valid compressed
|
|
21
|
-
data. This commonly occurred when following redirects with `auto_inflate`
|
|
22
|
-
enabled, because the redirect response had a `Content-Encoding` header but a
|
|
23
|
-
non-compressed body. ([#621])
|
|
24
|
-
- Persistent connections now auto-flush unread response bodies before sending
|
|
25
|
-
the next request, instead of raising `StateError`. Bodies up to 1 MiB are
|
|
26
|
-
drained transparently; larger bodies cause the connection to close and reopen.
|
|
27
|
-
This prevents the silent body clobbering described in [#371], where an unread
|
|
28
|
-
response body would return `""` after a subsequent request. ([#371])
|
|
29
|
-
- `Response#content_length` now handles duplicate `Content-Length` headers per
|
|
30
|
-
RFC 7230 Section 3.3.2. When all values are identical, they are collapsed into
|
|
31
|
-
a single valid value. When values conflict, `nil` is returned instead of
|
|
32
|
-
raising `TypeError`. ([#566])
|
|
33
|
-
- HTTP 1xx informational responses (e.g. `100 Continue`) are now transparently
|
|
34
|
-
skipped, returning the final response. This was a regression introduced when
|
|
35
|
-
the parser was migrated from http-parser to llhttp. ([#667])
|
|
36
|
-
- Redirect loop detection now considers cookies, so a redirect back to the
|
|
37
|
-
same URL with different cookies is no longer falsely detected as an endless
|
|
38
|
-
loop. Fixes cookie-dependent redirect flows where a server sets a cookie on
|
|
39
|
-
one hop and expects it on the next. ([#544])
|
|
40
|
-
- Per-operation timeouts (`HTTP.timeout(read: n, write: n, connect: n)`) no
|
|
41
|
-
longer default unspecified values to 0.25 seconds. Omitted timeouts now mean
|
|
42
|
-
no timeout for that operation, matching the behavior when no timeout is
|
|
43
|
-
configured at all. ([#579])
|
|
44
|
-
- Per-operation timeout handler now correctly handles `:wait_writable` from
|
|
45
|
-
`read_nonblock` and `:wait_readable` from `write_nonblock` on SSL sockets
|
|
46
|
-
during TLS renegotiation. Previously these symbols were returned as data
|
|
47
|
-
instead of being waited on. ([#358])
|
|
48
|
-
- Persistent sessions now follow cross-origin redirects instead of raising
|
|
49
|
-
`StateError`. `HTTP.persistent` returns an `HTTP::Session` that pools one
|
|
50
|
-
`HTTP::Client` per origin, so redirects to a different domain transparently
|
|
51
|
-
open (and reuse) a separate persistent connection. Cookie management is
|
|
52
|
-
preserved across all hops. ([#557])
|
|
53
|
-
- Chaining configuration methods (`.headers`, `.auth`, `.cookies`, etc.) on a
|
|
54
|
-
persistent session no longer breaks connection reuse. Child sessions created
|
|
55
|
-
by chaining now share the parent's connection pool, so
|
|
56
|
-
`HTTP.persistent(host).headers(...).get(path)` reuses the same underlying
|
|
57
|
-
TCP connection across calls. ([#372])
|
|
58
|
-
|
|
59
|
-
### Changed
|
|
60
|
-
|
|
61
|
-
- **BREAKING** `HTTP.persistent` now returns an `HTTP::Session` instead of an
|
|
62
|
-
`HTTP::Client`. The session pools persistent clients per origin and exposes
|
|
63
|
-
the same chainable API (`get`, `post`, `headers`, `follow`, etc.) plus a
|
|
64
|
-
`close` method that shuts down all pooled connections. Code that called
|
|
65
|
-
`HTTP::Client`-only methods on the return value will need updating. ([#557])
|
|
66
|
-
- **BREAKING** Convert options hash parameters to explicit keyword arguments
|
|
67
|
-
across the public API. Methods like `HTTP.get(url, body: "data")` continue to
|
|
68
|
-
work, but passing an explicit hash (e.g., `HTTP.get(url, {body: "data"})`) is
|
|
69
|
-
no longer supported, and unrecognized keyword arguments now raise
|
|
70
|
-
`ArgumentError`. Affected methods: all HTTP verb methods (`get`, `post`,
|
|
71
|
-
etc.), `request`, `follow`, `retriable`, `URI.new`, `Request.new`,
|
|
72
|
-
`Response.new`, `Redirector.new`, `Retriable::Performer.new`,
|
|
73
|
-
`Retriable::DelayCalculator.new`, and `Timeout::Null.new` (and subclasses).
|
|
74
|
-
`HTTP::URI.new` also no longer accepts `Addressable::URI` objects.
|
|
75
|
-
- **BREAKING** `addressable` is no longer a runtime dependency. It is now
|
|
76
|
-
lazy-loaded only when parsing non-ASCII (IRI) URIs or normalizing
|
|
77
|
-
internationalized hostnames. Install the `addressable` gem if you need
|
|
78
|
-
non-ASCII URI support. ASCII-only URIs use Ruby's stdlib `URI` parser
|
|
79
|
-
exclusively.
|
|
80
|
-
- **BREAKING** Extract request building into `HTTP::Request::Builder`. The
|
|
81
|
-
`build_request` method has been removed from `Client`, `Session`, and the
|
|
82
|
-
top-level `HTTP` module. Use `HTTP::Request::Builder.new(options).build(verb, uri)`
|
|
83
|
-
to construct requests without executing them.
|
|
84
|
-
|
|
85
|
-
### Added
|
|
86
|
-
|
|
87
|
-
- Block form for verb methods and `request` that auto-closes the connection
|
|
88
|
-
after the block returns. `HTTP.get(url) { |response| response.status }` yields
|
|
89
|
-
the response, closes the underlying connection, and returns the block's value.
|
|
90
|
-
Works with all verb methods and chained options. ([#270])
|
|
91
|
-
- HTTP caching feature (`HTTP.use(:caching)`) that stores and reuses responses
|
|
92
|
-
according to RFC 7234. Supports `Cache-Control` (`max-age`, `no-cache`,
|
|
93
|
-
`no-store`), `Expires`, `ETag` / `If-None-Match`, and
|
|
94
|
-
`Last-Modified` / `If-Modified-Since` for freshness checks and conditional
|
|
95
|
-
revalidation. Ships with a default in-memory store; custom stores can be
|
|
96
|
-
passed via `store:` option. Only GET and HEAD responses are cached. ([#223])
|
|
97
|
-
- `HTTP.digest_auth(user:, pass:)` for HTTP Digest Authentication (RFC 2617 /
|
|
98
|
-
RFC 7616). Automatically handles 401 challenges with digest credentials,
|
|
99
|
-
supporting MD5, SHA-256, MD5-sess, and SHA-256-sess algorithms with
|
|
100
|
-
quality-of-protection negotiation. Works as a chainable feature:
|
|
101
|
-
`HTTP.digest_auth(user: "admin", pass: "secret").get(url)` ([#448])
|
|
102
|
-
- Happy Eyeballs (RFC 8305) support via Ruby 3.4's native `TCPSocket`
|
|
103
|
-
implementation. Connection attempts now try multiple addresses (IPv6 and
|
|
104
|
-
IPv4) concurrently, improving reliability on dual-stack networks. Connect
|
|
105
|
-
timeouts are passed natively to `TCPSocket` instead of using
|
|
106
|
-
`Timeout.timeout`, avoiding `Thread.raise` interference with the Happy
|
|
107
|
-
Eyeballs state machine. ([#739])
|
|
108
|
-
- `HTTP.base_uri` for setting a base URI that resolves relative request paths
|
|
109
|
-
per RFC 3986. Supports chaining (`HTTP.base_uri("https://api.example.com/v1")
|
|
110
|
-
.get("users")`), and integrates with `persistent` connections by deriving the
|
|
111
|
-
host when omitted ([#519], [#512], [#493])
|
|
112
|
-
- `Request::Body#loggable?` and `Response::Body#loggable?` predicates, and a
|
|
113
|
-
`binary_formatter` option for the logging feature. Binary bodies
|
|
114
|
-
(IO/Enumerable request sources, binary-encoded request strings, and
|
|
115
|
-
binary-encoded responses) are now formatted instead of dumped raw,
|
|
116
|
-
preventing unreadable log output when transferring files like images or
|
|
117
|
-
audio. Available formatters: `:stats` (default, logs byte count),
|
|
118
|
-
`:base64` (logs base64-encoded content), or a custom `Proc`. Invalid
|
|
119
|
-
formatter values raise `ArgumentError` ([#784])
|
|
120
|
-
- `Feature#on_request` and `Feature#around_request` lifecycle hooks, called
|
|
121
|
-
before/around each request attempt (including retries), for per-attempt side
|
|
122
|
-
effects like instrumentation spans and circuit breakers ([#826])
|
|
123
|
-
- Pattern matching support (`deconstruct_keys`) for Response, Response::Status,
|
|
124
|
-
Headers, ContentType, and URI ([#642])
|
|
125
|
-
- Combined global and per-operation timeouts: global and per-operation timeouts
|
|
126
|
-
are no longer mutually exclusive. Use
|
|
127
|
-
`HTTP.timeout(global: 60, read: 30, write: 30, connect: 5)` to set both a
|
|
128
|
-
global request timeout and individual operation limits ([#773])
|
|
129
|
-
|
|
130
|
-
### Fixed
|
|
131
|
-
|
|
132
|
-
- `HTTP::URI.form_encode` now encodes newlines as `%0A` instead of
|
|
133
|
-
`%0D%0A` ([#449])
|
|
134
|
-
- Thread-safety: `Headers::Normalizer` cache is now per-thread via
|
|
135
|
-
`Thread.current`, eliminating a potential race condition when multiple
|
|
136
|
-
threads share a normalizer instance
|
|
137
|
-
- Instrumentation feature now correctly starts a new span for each retry
|
|
138
|
-
attempt, fixing `NoMethodError` with `ActiveSupport::Notifications` when
|
|
139
|
-
using `.retriable` with the instrumentation feature ([#826])
|
|
140
|
-
- Raise `HTTP::URI::InvalidError` for malformed or schemeless URIs and
|
|
141
|
-
`ArgumentError` for nil or empty URIs, instead of confusing
|
|
142
|
-
`UnsupportedSchemeError` or `Addressable::URI::InvalidURIError` ([#565])
|
|
143
|
-
- Strip `Authorization` and `Cookie` headers when following redirects to a
|
|
144
|
-
different origin (scheme, host, or port) to prevent credential leakage
|
|
145
|
-
([#516], [#770])
|
|
146
|
-
- AutoInflate now preserves the response charset encoding instead of
|
|
147
|
-
defaulting to `Encoding::BINARY` ([#535])
|
|
148
|
-
- `LocalJumpError` when using instrumentation with instrumenters that
|
|
149
|
-
unconditionally yield in `#instrument` (e.g., `ActiveSupport::Notifications`)
|
|
150
|
-
([#673])
|
|
151
|
-
- Logging feature no longer eagerly consumes the response body at debug level;
|
|
152
|
-
body chunks are now logged as they are streamed, preserving
|
|
153
|
-
`response.body.each` ([#785])
|
|
154
|
-
|
|
155
|
-
### Removed
|
|
156
|
-
|
|
157
|
-
- `HTTP::URI` setter methods (`scheme=`, `user=`, `password=`, `authority=`,
|
|
158
|
-
`origin=`, `port=`, `request_uri=`, `fragment=`) and normalized accessors
|
|
159
|
-
(`normalized_user`, `normalized_password`, `normalized_port`,
|
|
160
|
-
`normalized_path`, `normalized_query`) that were delegated to
|
|
161
|
-
`Addressable::URI` but never used internally
|
|
162
|
-
- `HTTP::URI#origin` is no longer delegated to `Addressable::URI`. The new
|
|
163
|
-
implementation follows RFC 6454, normalizing scheme and host to lowercase
|
|
164
|
-
and excluding user info from the origin string
|
|
165
|
-
- `HTTP::URI#request_uri` is no longer delegated to `Addressable::URI`
|
|
166
|
-
- `HTTP::URI#omit` is no longer delegated to `Addressable::URI` and now
|
|
167
|
-
returns `HTTP::URI` instead of `Addressable::URI` ([#491])
|
|
168
|
-
- `HTTP::URI#query_values` and `HTTP::URI#query_values=` delegations to
|
|
169
|
-
`Addressable::URI`. Query parameter merging now uses stdlib
|
|
170
|
-
`URI.decode_www_form`/`URI.encode_www_form`
|
|
171
|
-
- `HTTP::URI` delegations for `normalized_scheme`, `normalized_authority`,
|
|
172
|
-
`normalized_fragment`, and `authority` to `Addressable::URI`. The URI
|
|
173
|
-
normalizer now inlines these operations directly
|
|
174
|
-
- `HTTP::URI#join` is no longer delegated to `Addressable::URI` and now
|
|
175
|
-
returns `HTTP::URI` instead of `Addressable::URI`. Uses stdlib `URI.join`
|
|
176
|
-
with automatic percent-encoding of non-ASCII characters ([#491])
|
|
177
|
-
- `HTTP::URI.form_encode` no longer delegates to `Addressable::URI`. Uses
|
|
178
|
-
stdlib `URI.encode_www_form` instead
|
|
179
|
-
|
|
180
|
-
### Changed
|
|
181
|
-
|
|
182
|
-
- **BREAKING** `HTTP::Response::Status` no longer inherits from `Delegator`.
|
|
183
|
-
It now uses `Comparable` and `Forwardable` instead, providing `to_i`,
|
|
184
|
-
`to_int`, and `<=>` for numeric comparisons and range matching. Code that
|
|
185
|
-
called `__getobj__`/`__setobj__` or relied on implicit delegation of
|
|
186
|
-
arbitrary `Integer` methods (e.g., `status.even?`) will need to be updated
|
|
187
|
-
to use `status.code` instead
|
|
188
|
-
- **BREAKING** Chainable option methods (`.headers`, `.timeout`, `.cookies`,
|
|
189
|
-
`.auth`, `.follow`, `.via`, `.use`, `.encoding`, `.nodelay`, `.basic_auth`,
|
|
190
|
-
`.accept`) now return a thread-safe `HTTP::Session` instead of `HTTP::Client`.
|
|
191
|
-
`Session` creates a new `Client` for each request, making it safe to share a
|
|
192
|
-
configured session across threads. `HTTP.persistent` still returns
|
|
193
|
-
`HTTP::Client` since persistent connections require mutable state. Code that
|
|
194
|
-
calls HTTP verb methods (`.get`, `.post`, etc.) or accesses `.default_options`
|
|
195
|
-
is unaffected. Code that checks `is_a?(HTTP::Client)` on the return value of
|
|
196
|
-
chainable methods will need to be updated to check for `HTTP::Session`
|
|
197
|
-
- **BREAKING** `.retriable` now returns `HTTP::Session` instead of
|
|
198
|
-
`HTTP::Retriable::Client`. Retry is a session-level option: it flows through
|
|
199
|
-
`HTTP::Options` into `HTTP::Client#perform`, eliminating the need for
|
|
200
|
-
separate `Retriable::Client` and `Retriable::Session` classes
|
|
201
|
-
- Improved error message when request body size cannot be determined to suggest
|
|
202
|
-
setting `Content-Length` explicitly or using chunked `Transfer-Encoding` ([#560])
|
|
203
|
-
- **BREAKING** `Connection#readpartial` now raises `EOFError` instead of
|
|
204
|
-
returning `nil` at end-of-stream, and supports an `outbuf` parameter,
|
|
205
|
-
conforming to the `IO#readpartial` API. `Body#readpartial` and
|
|
206
|
-
`Inflater#readpartial` also raise `EOFError` ([#618])
|
|
207
|
-
- **BREAKING** Stricter timeout options parsing: `.timeout()` with a Hash now
|
|
208
|
-
rejects unknown keys, non-numeric values, string keys, and empty hashes ([#754])
|
|
209
|
-
- Bumped min llhttp dependency version
|
|
210
|
-
- **BREAKING** Handle responses in the reverse order from the requests ([#776])
|
|
211
|
-
- **BREAKING** `Response#cookies` now returns `Array<HTTP::Cookie>` instead of
|
|
212
|
-
`HTTP::CookieJar`. The `cookies` option has been removed from `Options`;
|
|
213
|
-
`Chainable#cookies` now sets the `Cookie` header directly with no implicit
|
|
214
|
-
merging — the last `.cookies()` call wins ([#536])
|
|
215
|
-
- Cookie jar management during redirects moved from `Redirector` to `Session`.
|
|
216
|
-
`Redirector` is now a pure redirect-following engine with no cookie
|
|
217
|
-
awareness; `Session#request` manages cookies across redirect hops
|
|
218
|
-
- **BREAKING** `HTTP::Options.new`, `HTTP::Client.new`, and `HTTP::Session.new`
|
|
219
|
-
now accept keyword arguments instead of an options hash. For example,
|
|
220
|
-
`HTTP::Options.new(response: :body)` continues to work, but
|
|
221
|
-
`HTTP::Options.new({response: :body})` must be updated to
|
|
222
|
-
`HTTP::Options.new(**options)`. Invalid option names now raise
|
|
223
|
-
`ArgumentError` automatically ([#447])
|
|
224
|
-
|
|
225
|
-
### Removed
|
|
226
|
-
|
|
227
|
-
- **BREAKING** Drop Ruby 2.x support
|
|
228
|
-
- **BREAKING** Remove `Headers::Mixin` and the `[]`/`[]=` delegators on
|
|
229
|
-
`Request` and `Response`. Use `request.headers["..."]` and
|
|
230
|
-
`response.headers["..."]` instead ([#537])
|
|
231
|
-
|
|
232
|
-
[#270]: https://github.com/httprb/http/issues/270
|
|
233
|
-
[#223]: https://github.com/httprb/http/issues/223
|
|
234
|
-
[#358]: https://github.com/httprb/http/issues/358
|
|
235
|
-
[#371]: https://github.com/httprb/http/issues/371
|
|
236
|
-
[#372]: https://github.com/httprb/http/issues/372
|
|
237
|
-
[#447]: https://github.com/httprb/http/issues/447
|
|
238
|
-
[#448]: https://github.com/httprb/http/issues/448
|
|
239
|
-
[#449]: https://github.com/httprb/http/issues/449
|
|
240
|
-
[#491]: https://github.com/httprb/http/issues/491
|
|
241
|
-
[#493]: https://github.com/httprb/http/pull/493
|
|
242
|
-
[#512]: https://github.com/httprb/http/issues/512
|
|
243
|
-
[#516]: https://github.com/httprb/http/issues/516
|
|
244
|
-
[#519]: https://github.com/httprb/http/issues/519
|
|
245
|
-
[#535]: https://github.com/httprb/http/issues/535
|
|
246
|
-
[#536]: https://github.com/httprb/http/issues/536
|
|
247
|
-
[#537]: https://github.com/httprb/http/issues/537
|
|
248
|
-
[#544]: https://github.com/httprb/http/issues/544
|
|
249
|
-
[#557]: https://github.com/httprb/http/issues/557
|
|
250
|
-
[#560]: https://github.com/httprb/http/pull/560
|
|
251
|
-
[#565]: https://github.com/httprb/http/issues/565
|
|
252
|
-
[#566]: https://github.com/httprb/http/issues/566
|
|
253
|
-
[#579]: https://github.com/httprb/http/issues/579
|
|
254
|
-
[#618]: https://github.com/httprb/http/pull/618
|
|
255
|
-
[#621]: https://github.com/httprb/http/issues/621
|
|
256
|
-
[#642]: https://github.com/httprb/http/issues/642
|
|
257
|
-
[#667]: https://github.com/httprb/http/issues/667
|
|
258
|
-
[#673]: https://github.com/httprb/http/issues/673
|
|
259
|
-
[#739]: https://github.com/httprb/http/issues/739
|
|
260
|
-
[#754]: https://github.com/httprb/http/pull/754
|
|
261
|
-
[#770]: https://github.com/httprb/http/issues/770
|
|
262
|
-
[#773]: https://github.com/httprb/http/issues/773
|
|
263
|
-
[#776]: https://github.com/httprb/http/issues/776
|
|
264
|
-
[#784]: https://github.com/httprb/http/issues/784
|
|
265
|
-
[#785]: https://github.com/httprb/http/issues/785
|
|
266
|
-
[#826]: https://github.com/httprb/http/issues/826
|
|
267
|
-
[unreleased]: https://github.com/httprb/http/compare/v5.3.0...main
|
data/CONTRIBUTING.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Help and Discussion
|
|
2
|
-
|
|
3
|
-
If you need help or just want to talk about the http.rb,
|
|
4
|
-
visit the http.rb Google Group:
|
|
5
|
-
|
|
6
|
-
https://groups.google.com/forum/#!forum/httprb
|
|
7
|
-
|
|
8
|
-
You can join by email by sending a message to:
|
|
9
|
-
|
|
10
|
-
[httprb+subscribe@googlegroups.com](mailto:httprb+subscribe@googlegroups.com)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Reporting bugs
|
|
14
|
-
|
|
15
|
-
The best way to report a bug is by providing a reproduction script. A half
|
|
16
|
-
working script with comments for the parts you were unable to automate is still
|
|
17
|
-
appreciated.
|
|
18
|
-
|
|
19
|
-
In any case, specify following info in description of your issue:
|
|
20
|
-
|
|
21
|
-
- What you're trying to accomplish
|
|
22
|
-
- What you expected to happen
|
|
23
|
-
- What actually happened
|
|
24
|
-
- The exception backtrace(s), if any
|
|
25
|
-
- Version of gem or commit ref you are using
|
|
26
|
-
- Version of ruby you are using
|
data/SECURITY.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
Security updates are applied only to the most recent release.
|
|
6
|
-
|
|
7
|
-
## Reporting a Vulnerability
|
|
8
|
-
|
|
9
|
-
If you have discovered a security vulnerability in this project, please report
|
|
10
|
-
it privately. **Do not disclose it as a public issue.** This gives us time to
|
|
11
|
-
work with you to fix the issue before public exposure, reducing the chance that
|
|
12
|
-
the exploit will be used before a patch is released.
|
|
13
|
-
|
|
14
|
-
Please disclose it at [security advisory](https://github.com/httprb/http/security/advisories/new).
|
|
15
|
-
|
|
16
|
-
This project is maintained by a team of volunteers on a reasonable-effort basis.
|
|
17
|
-
As such, please give us at least 90 days to work on a fix before public exposure.
|