Compare commits

...

5 Commits

Author SHA1 Message Date
HoneyryderChuck
17297cf062 use --force-yes for 2.2 2022-11-28 23:19:34 +00:00
HoneyryderChuck
31013ba0dd Merge branch 'fix-repo-links' into 'master'
Fix repo links

See merge request os85/httpx!222
2022-11-28 23:13:11 +00:00
HoneyryderChuck
bd66b00882 force unsigned package for ruby 2.1 2022-11-28 22:55:09 +00:00
HoneyryderChuck
34052be90d lint regexp 2022-11-28 22:47:02 +00:00
HoneyryderChuck
92737d09b5 rewriting repo links to point to new namespace 2022-11-28 22:45:44 +00:00
43 changed files with 80 additions and 80 deletions

View File

@ -21,6 +21,8 @@ variables:
stage: test
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
artifacts:
paths:
- coverage/

View File

@ -1,8 +1,8 @@
# HTTPX: A Ruby HTTP library for tomorrow... and beyond!
[![Gem Version](https://badge.fury.io/rb/httpx.svg)](http://rubygems.org/gems/httpx)
[![pipeline status](https://gitlab.com/honeyryderchuck/httpx/badges/master/pipeline.svg)](https://gitlab.com/honeyryderchuck/httpx/pipelines?page=1&scope=all&ref=master)
[![coverage report](https://gitlab.com/honeyryderchuck/httpx/badges/master/coverage.svg?job=coverage)](https://honeyryderchuck.gitlab.io/httpx/coverage/#_AllFiles)
[![pipeline status](https://gitlab.com/os85/httpx/badges/master/pipeline.svg)](https://gitlab.com/os85/httpx/pipelines?page=1&scope=all&ref=master)
[![coverage report](https://gitlab.com/os85/httpx/badges/master/coverage.svg?job=coverage)](https://os85.gitlab.io/httpx/coverage/#_AllFiles)
HTTPX is an HTTP client library for the Ruby programming language.
@ -141,10 +141,10 @@ All Rubies greater or equal to 2.1, and always latest JRuby and Truffleruby.
## Resources
| | |
| ------------- | --------------------------------------------------- |
| Website | https://honeyryderchuck.gitlab.io/httpx/ |
| Documentation | https://honeyryderchuck.gitlab.io/httpx/rdoc/ |
| Wiki | https://honeyryderchuck.gitlab.io/httpx/wiki/home.html |
| CI | https://gitlab.com/honeyryderchuck/httpx/pipelines |
| Website | https://os85.gitlab.io/httpx/ |
| Documentation | https://os85.gitlab.io/httpx/rdoc/ |
| Wiki | https://os85.gitlab.io/httpx/wiki/home.html |
| CI | https://gitlab.com/os85/httpx/pipelines |
| Rubygems | https://rubygems.org/gems/httpx |
## Caveats
@ -155,8 +155,8 @@ ALPN negotiation is required for "auto" HTTP/2 "https" requests. This is availab
### Known bugs
* Doesn't work with ruby 2.4.0 for Windows (see [#36](https://gitlab.com/honeyryderchuck/httpx/issues/36)).
* Using `total_timeout` along with the `:persistent` plugin [does not work as you might expect](https://gitlab.com/honeyryderchuck/httpx/-/wikis/Timeouts#total_timeout).
* Doesn't work with ruby 2.4.0 for Windows (see [#36](https://gitlab.com/os85/httpx/issues/36)).
* Using `total_timeout` along with the `:persistent` plugin [does not work as you might expect](https://gitlab.com/os85/httpx/-/wikis/Timeouts#total_timeout).
## Versioning Policy

View File

@ -67,7 +67,7 @@ desc "Builds Homepage"
task :prepare_website => ["rdoc"] do
require "fileutils"
FileUtils.rm_rf("wiki")
system("git clone https://gitlab.com/honeyryderchuck/httpx.wiki.git wiki")
system("git clone https://gitlab.com/os85/httpx.wiki.git wiki")
Dir.glob("wiki/*.md") do |path|
data = File.read(path)
name = File.basename(path, ".md")

View File

@ -15,7 +15,7 @@ http.get(stream_api_endpoint, stream: true).each_line do |line|
end
```
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Stream
https://gitlab.com/os85/httpx/-/wikis/Stream
### Rate Limiter
@ -27,7 +27,7 @@ HTTPX.plugin(:rate_limiter).get(rate_limited_api_endpoint)
# waits 3 seconds before retrying
```
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Rate-Limiter
https://gitlab.com/os85/httpx/-/wikis/Rate-Limiter
### Ruby 3

View File

@ -21,7 +21,7 @@ stub_http_request(:get, "https://www.google.com").and_return(status: 200, body:
```
Read more about it in the [webmock integration documentation](https://honeyryderchuck.gitlab.io/httpx/wiki/Webmock-Adapter).
Read more about it in the [webmock integration documentation](https://os85.gitlab.io/httpx/wiki/Webmock-Adapter).
### Datadog Adapter
@ -40,7 +40,7 @@ A trace will be emitted for every request, so this should be an interesting visu
Customization options and traces are similar to what [the net-http adapter provides](https://docs.datadoghq.com/tracing/setup_overview/setup/ruby/#nethttp).
Read more about it in the [datadog integration documentation](https://honeyryderchuck.gitlab.io/httpx/wiki/Datadog-Adapter).
Read more about it in the [datadog integration documentation](https://os85.gitlab.io/httpx/wiki/Datadog-Adapter).
## Improvements
@ -52,7 +52,7 @@ Read more about it in the [datadog integration documentation](https://honeyryder
HTTPX.plugin(:multipart).post(uri, form: {file: File.new("path/to/file")})
```
Read more about it in the [multipart plugin documentation](https://honeyryderchuck.gitlab.io/httpx/wiki/Multipart-Uploads), including also about why this was made.
Read more about it in the [multipart plugin documentation](https://os85.gitlab.io/httpx/wiki/Multipart-Uploads), including also about why this was made.
### Expect Plugin
@ -72,5 +72,3 @@ response = session.get(proxy_ip, headers: { "host" => upstream_hostname }, ssl:
## Bugfixes
A default 5 second timeout is in-place when using the DNS `:system` resolver, as it was found out that. when using the `resolv` library, the DNS query will not be retried otherwise. You can change this setting py passing `resolver_options: { timeouts: ANOTHER_TIMEOUT}`. In the future, this may become another timeout option, however.

View File

@ -6,19 +6,19 @@
A new plugin, `:aws_sigv4`, is now shipped with `httpx`. It implements the [AWS Signature Version 4 request signing process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html), a well documented way of authenticating requests to AWS services, which has since been adopted by other cloud providers, such as Google Cloud Storage.
See how to use it here: https://gitlab.com/honeyryderchuck/httpx/-/wikis/AWS-Sigv4#sessionaws_sigv4_authentication
See how to use it here: https://gitlab.com/os85/httpx/-/wikis/AWS-Sigv4#sessionaws_sigv4_authentication
For convenience, there's a derivative plugin, `:aws_sdk_authentication`, which builds on top of `:aws_sigv4`, and integrates with the `aws-sdk-core` gem, maintained by AWS, to resolve the authentication credentials (p.ex. if you support ephemeral access keys).
See how to use it here: https://gitlab.com/honeyryderchuck/httpx/-/wikis/AWS-Sigv4#sessionaws_sdk_authentication
See how to use it here: https://gitlab.com/os85/httpx/-/wikis/AWS-Sigv4#sessionaws_sdk_authentication
Other FAQ: https://gitlab.com/honeyryderchuck/httpx/-/wikis/AWS-Sigv4#faqs
Other FAQ: https://gitlab.com/os85/httpx/-/wikis/AWS-Sigv4#faqs
### HTTP/2 support for JRuby
`jruby-openssl` doesn't support ALPN protocol negotiation, nor are there plans to implement, which limited the seamless HTTP/2 usage in `httpx`. A new connection adapter was therefore added specifically for JRuby, where ssl/tls connections will be handled using ffi-based openssl bindings, provided you bundle `ffi-compiler` and `concurrent-ruby`, and install a TLS/1.2-compatible `openssl` package.
See how to use it here: https://gitlab.com/honeyryderchuck/httpx/-/wikis/JRuby-Truffleruby-Other-Rubies#http2
See how to use it here: https://gitlab.com/os85/httpx/-/wikis/JRuby-Truffleruby-Other-Rubies#http2
## Improvements
@ -52,4 +52,4 @@ They all contributed to a massive performance improvement, itself reflected in t
* Fixed TCP handshake Errno::INPROGRESS handling inside TLS connnections, which was causing the process to hang in a high handshake contention scenario;
* Do not call the event loop if there's nothing to listen on (the DoH resolver was being listened on even if there was nothing to be request);
* Fixed double event registry for DoH resolvers;
*
*

View File

@ -4,9 +4,9 @@
### Upgrade plugin
A new plugin, `:upgrade`, is now available. This plugin allows one to "hook" on HTTP/1.1's protocol upgrade mechanism (see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism), which is the mechanism that browsers use to initiate websockets (there is an example of how to use `httpx` to start a websocket client connection [in the tests](https://gitlab.com/honeyryderchuck/httpx/-/blob/master/test/support/requests/plugins/upgrade.rb))
A new plugin, `:upgrade`, is now available. This plugin allows one to "hook" on HTTP/1.1's protocol upgrade mechanism (see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism), which is the mechanism that browsers use to initiate websockets (there is an example of how to use `httpx` to start a websocket client connection [in the tests](https://gitlab.com/os85/httpx/-/blob/master/test/support/requests/plugins/upgrade.rb))
You can read more about the `:upgrade` plugin in the [wiki](https://honeyryderchuck.gitlab.io/httpx/wiki/Connection-Upgrade).
You can read more about the `:upgrade` plugin in the [wiki](https://os85.gitlab.io/httpx/wiki/Connection-Upgrade).
It's the basis of two plugins:
@ -14,13 +14,13 @@ It's the basis of two plugins:
This plugin was been rewritten on top of the `:upgrade` plugin, and handles upgrading a plaintext (non-"https") HTTP/1.1 connection, into an HTTP/2 connection.
https://honeyryderchuck.gitlab.io/httpx/wiki/Connection-Upgrade#h2c
https://os85.gitlab.io/httpx/wiki/Connection-Upgrade#h2c
#### `:upgrade/h2`
This plugin handles when a server responds to a request with an `Upgrade: h2` header, does the following requests to the same origin via HTTP/2 prior knowledge (bypassing the necessity for ALPN negotiation, which is the whole point of the feature).
https://honeyryderchuck.gitlab.io/httpx/wiki/Connection-Upgrade#h2
https://os85.gitlab.io/httpx/wiki/Connection-Upgrade#h2
### `:addresses` option

View File

@ -17,7 +17,7 @@ helloworld_svc = helloworld_stub.rpc(:SayHello, HelloRequest, HelloReply)
result = helloworld_svc.say_hello(HelloRequest.new(name: "Jack")) #=> HelloReply: "Hello Jack"
```
You can read more about the `:grpc` plugin in the [wiki](https://honeyryderchuck.gitlab.io/httpx/wiki/GRPC).
You can read more about the `:grpc` plugin in the [wiki](https://os85.gitlab.io/httpx/wiki/GRPC).
### :origin
@ -37,7 +37,7 @@ httpbin.get("/httpbin/get") #=> #<Response:5420 HTTP/2.0 @status=200 ....
* setting an unexpected option will now raise an `HTTPX::Error` with an helpful message, instead of a confusing `NoMethodError`:
```ruby
HTTPX.with(foo: "bar")
HTTPX.with(foo: "bar")
# before
#=> NoMethodError
# after

View File

@ -16,7 +16,7 @@ response.body.to_s #=> ""
The justification for this behaviour probably had to do with avoiding keeping huge payloads around, but it got a bit lost in git history. It became a feature, not a bug.
However, I got an [issue report](https://gitlab.com/honeyryderchuck/httpx/-/issues/143) that made me change my mind about this behaviour (tl;dr: it broke pattern matching when matching against response bodies more than once).
However, I got an [issue report](https://gitlab.com/os85/httpx/-/issues/143) that made me change my mind about this behaviour (tl;dr: it broke pattern matching when matching against response bodies more than once).
So now, you can call `.to_s` how many times you want!
@ -62,7 +62,7 @@ stub.get_feature(# ...
### OptionsMethods for plugins
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Custom-Plugins
https://gitlab.com/os85/httpx/-/wikis/Custom-Plugins
You can now define an `OptionsMethods` module under your custom plugin to define your own methods. The tl;dr is, that, given the following module below, a new `:bar` option will be available (and the method will be used to set it):
@ -80,7 +80,7 @@ HTTPX.plugin(CustomPlugin).with(bar: 2)
The behaviour of the cookies jar from the `:cookies` plugin was a bit unpredictable in certain conditions, for instance if a "Cookie" header would be passed directly via `.with(headers: {"Cookie" => "a=1"})` and there'd be a value for it already (in same cases, it'd be fully ignored). This would even get worse, if the session had a jar, and a specific set of cookies would be passed to a request(i.e.: `session_with_cookies.get("http://url.get", headers: {"Cookies" => "..."}`).
The behaviour was fixed, and is now specced under https://gitlab.com/honeyryderchuck/httpx/-/blob/master/test/support/requests/plugins/cookies.rb .
The behaviour was fixed, and is now specced under https://gitlab.com/os85/httpx/-/blob/master/test/support/requests/plugins/cookies.rb .
## Bugfixes

View File

@ -4,7 +4,7 @@
### Response mime type decoders (#json, #form)
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Response-Handling#response-decoding
https://gitlab.com/os85/httpx/-/wikis/Response-Handling#response-decoding
Two new methods, `#json` and `#form`, were added to `HTTPX::Response`. As the name implies, they'll decode the raw payload into ruby objects you can work with.

View File

@ -4,7 +4,7 @@
### Response Cache
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Response-Cache
https://gitlab.com/os85/httpx/-/wikis/Response-Cache
The `:response_cache` plugin handles transparent usage of HTTP caching and conditional requests to improve performance and bandwidth usage.
@ -22,7 +22,7 @@ r1.body == r2.body #=> true
On the `:retries` plugin, jitter calculation is now applied to the value in seconds defined by user after which a request should be retried (i.e. if `:retry_after` option is set to `2`, the retry interval may be `1.5422312` seconds, for example). This is important to avoid cases of synchronized "thundering herd", where server rejects requests, but they all get retried at the same time because the retry interval is exactly the same.
You can override the jitter calculation function by using the [:retry_jitter](https://gitlab.com/honeyryderchuck/httpx/-/wikis/Retries#retry_jitter) option:
You can override the jitter calculation function by using the [:retry_jitter](https://gitlab.com/os85/httpx/-/wikis/Retries#retry_jitter) option:
```ruby
HTTPX.plugin(:retries, retry_after: 2, retry_jitter: ->(interval) { interval + rand }) # interval is 3
@ -44,7 +44,7 @@ end
## Improvements
* `webmock` adapter: added support for "stub_http_request#to_timeout" (https://gitlab.com/honeyryderchuck/httpx/-/merge_requests/165).
* `webmock` adapter: added support for "stub_http_request#to_timeout" (https://gitlab.com/os85/httpx/-/merge_requests/165).
## timers not a dependency
@ -57,7 +57,7 @@ The functionality provided by the `timers` gem was replaced by a simpler custom
## Bugfixes
* Fixed Error class declaration on response decoders when mime type is invalid (https://gitlab.com/honeyryderchuck/httpx/-/merge_requests/166).
* Fixed Error class declaration on response decoders when mime type is invalid (https://gitlab.com/os85/httpx/-/merge_requests/166).
* `ErrorResponse#to_s` now removes ANSI escape sequences from error backtraces.
* Persistent connections were kept around both in the pool and in the selector; the first is necessary, but the second caused busy loop scenarios all over; they are now removed when no requests are being handled.
* Connections which failed connection handshake were removed from the pool, but not from the selector list, causing busy loop scenarios in a few cases; this has been fixed.

View File

@ -7,4 +7,4 @@
## Chore
The quirk of using the `:persistent` plugin with `:total_timeout` has been documented: https://gitlab.com/honeyryderchuck/httpx/-/wikis/Timeouts#total_timeout.
The quirk of using the `:persistent` plugin with `:total_timeout` has been documented: https://gitlab.com/os85/httpx/-/wikis/Timeouts#total_timeout.

View File

@ -28,7 +28,7 @@ Connection coalescing has also been enabled for proxied connections (also `CONNE
### curl-to-httpx
widget in [project website](https://honeyryderchuck.gitlab.io/httpx/) to turn curl commands into the equivalent `httpx` code.
widget in [project website](https://os85.gitlab.io/httpx/) to turn curl commands into the equivalent `httpx` code.
## Bugfixes

View File

@ -4,7 +4,7 @@
### Sentry integration
Documentation: https://gitlab.com/honeyryderchuck/httpx/-/wikis/Sentry-Adapter
Documentation: https://gitlab.com/os85/httpx/-/wikis/Sentry-Adapter
`httpx` ships with integration for `sentry-ruby` to provide HTTP request specific breadcrumbs and tracing. It can be enabled via:

View File

@ -4,7 +4,7 @@
### `:write_timeout`, `:read_timeout` and `:request_timeout`
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Timeouts
https://gitlab.com/os85/httpx/-/wikis/Timeouts
The following timeouts are now supported:
@ -22,7 +22,7 @@ None of them has a default value, in order not to break integrations, but that'l
### Circuit Breaker plugin
https://gitlab.com/honeyryderchuck/httpx/-/wikis/Circuit-Breaker
https://gitlab.com/os85/httpx/-/wikis/Circuit-Breaker
The `:circuit_breaker` plugin wraps around errors happening when performing HTTP requests, and support options for setting maximum number of attempts before circuit opens (`:circuit_breaker_max_attempts`), period after which attempts should be reset (`:circuit_breaker_reset_attempts_in`), timespan until circuit half-opens (`circuit_breaker_break_in`), respective half-open drip rate (`:circuit_breaker_half_open_drip_rate`), and a callback to do your own check on whether a response has failed, in case you want HTTP level errors to be marked as failed attempts (`:circuit_breaker_break_on`).
@ -36,7 +36,7 @@ http.get(...
### WebDAV plugin
https://gitlab.com/honeyryderchuck/httpx/-/wikis/WebDav
https://gitlab.com/os85/httpx/-/wikis/WebDav
The `:webdav` introduces some "convenience" methods to perform common WebDAV operations.

View File

@ -11,7 +11,7 @@ services:
- doh
doh:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:3
image: registry.gitlab.com/os85/httpx/nghttp2:1
depends_on:
- doh-proxy
entrypoint:

View File

@ -11,7 +11,7 @@ services:
- doh
doh:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:3
image: registry.gitlab.com/os85/httpx/nghttp2:1
depends_on:
- doh-proxy
entrypoint:

View File

@ -11,7 +11,7 @@ services:
- doh
doh:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:3
image: registry.gitlab.com/os85/httpx/nghttp2:1
depends_on:
- doh-proxy
entrypoint:

View File

@ -11,7 +11,7 @@ services:
- doh
doh:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:2
image: registry.gitlab.com/os85/httpx/nghttp2:1
depends_on:
- doh-proxy
entrypoint:

View File

@ -77,7 +77,7 @@ services:
-d 3
http2proxy:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:3
image: registry.gitlab.com/os85/httpx/nghttp2:1
ports:
- 3300:80
depends_on:
@ -88,7 +88,7 @@ services:
--no-ocsp --frontend '*,80;no-tls' --backend 'httpproxy,3128' --http2-proxy
nghttp2:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:3
image: registry.gitlab.com/os85/httpx/nghttp2:1
ports:
- 80:80
- 443:443
@ -102,7 +102,7 @@ services:
--conf /home/nghttp.conf --no-ocsp --frontend '*,80;no-tls' --frontend '*,443'
altsvc-nghttp2:
image: registry.gitlab.com/honeyryderchuck/httpx/nghttp2:3
image: registry.gitlab.com/os85/httpx/nghttp2:1
ports:
- 81:80
- 444:443

View File

@ -15,15 +15,15 @@ Gem::Specification.new do |gem|
gem.summary = "HTTPX, to the future, and beyond"
gem.homepage = "https://gitlab.com/honeyryderchuck/httpx"
gem.homepage = "https://gitlab.com/os85/httpx"
gem.license = "Apache 2.0"
gem.metadata = {
"bug_tracker_uri" => "https://gitlab.com/honeyryderchuck/httpx/issues",
"changelog_uri" => "https://honeyryderchuck.gitlab.io/httpx/#release-notes",
"documentation_uri" => "https://honeyryderchuck.gitlab.io/httpx/rdoc/",
"source_code_uri" => "https://gitlab.com/honeyryderchuck/httpx",
"homepage_uri" => "https://honeyryderchuck.gitlab.io/httpx/",
"bug_tracker_uri" => "https://gitlab.com/os85/httpx/issues",
"changelog_uri" => "https://os85.gitlab.io/httpx/#release-notes",
"documentation_uri" => "https://os85.gitlab.io/httpx/rdoc/",
"source_code_uri" => "https://gitlab.com/os85/httpx",
"homepage_uri" => "https://os85.gitlab.io/httpx/",
"rubygems_mfa_required" => "true",
}

View File

@ -6,7 +6,7 @@ module HTTPX
# This plugin adds a shim +authentication+ method to the session, which will fill
# the HTTP Authorization header.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Authentication#authentication
# https://gitlab.com/os85/httpx/wikis/Authentication#authentication
#
module Authentication
module InstanceMethods

View File

@ -7,7 +7,7 @@ module HTTPX
#
# https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/AWS-SigV4
# https://gitlab.com/os85/httpx/wikis/AWS-SigV4
#
module AWSSigV4
Credentials = Struct.new(:username, :password, :security_token)

View File

@ -5,7 +5,7 @@ module HTTPX
#
# This plugin adds helper methods to implement HTTP Basic Auth (https://tools.ietf.org/html/rfc7617)
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Authentication#basic-authentication
# https://gitlab.com/os85/httpx/wikis/Authentication#basic-authentication
#
module BasicAuth
class << self

View File

@ -5,7 +5,7 @@ module HTTPX
#
# This plugin implements a circuit breaker around connection errors.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Circuit-Breaker
# https://gitlab.com/os85/httpx/wikis/Circuit-Breaker
#
module CircuitBreaker
using URIExtensions

View File

@ -10,7 +10,7 @@ module HTTPX
#
# It supports both *gzip* and *deflate*.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Compression
# https://gitlab.com/os85/httpx/wikis/Compression
#
module Compression
class << self

View File

@ -9,7 +9,7 @@ module HTTPX
#
# It also adds a *#cookies* helper, so that you can pre-fill the cookies of a session.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Cookies
# https://gitlab.com/os85/httpx/wikis/Cookies
#
module Cookies
def self.load_dependencies(*)

View File

@ -5,7 +5,7 @@ module HTTPX
#
# This plugin adds helper methods to implement HTTP Digest Auth (https://tools.ietf.org/html/rfc7616)
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Authentication#authentication
# https://gitlab.com/os85/httpx/wikis/Authentication#authentication
#
module DigestAuth
DigestError = Class.new(Error)

View File

@ -5,7 +5,7 @@ module HTTPX
#
# This plugin makes all HTTP/1.1 requests with a body send the "Expect: 100-continue".
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Expect#expect
# https://gitlab.com/os85/httpx/wikis/Expect#expect
#
module Expect
EXPECT_TIMEOUT = 2

View File

@ -11,7 +11,7 @@ module HTTPX
#
# It also doesn't follow insecure redirects (https -> http) by default (see *follow_insecure_redirects*).
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Follow-Redirects
# https://gitlab.com/os85/httpx/wikis/Follow-Redirects
#
module FollowRedirects
MAX_REDIRECTS = 3

View File

@ -16,7 +16,7 @@ module HTTPX
#
# This plugin adds DSL to build GRPC interfaces.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/GRPC
# https://gitlab.com/os85/httpx/wikis/GRPC
#
module GRPC
unless String.method_defined?(:underscore)

View File

@ -6,7 +6,7 @@ module HTTPX
# This plugin adds support for upgrading a plaintext HTTP/1.1 connection to HTTP/2
# (https://tools.ietf.org/html/rfc7540#section-3.2)
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Upgrade#h2c
# https://gitlab.com/os85/httpx/wikis/Upgrade#h2c
#
module H2C
VALID_H2C_VERBS = %i[get options head].freeze

View File

@ -7,7 +7,7 @@ module HTTPX
#
# HTTPX.post(URL, form: form: { image: HTTP::FormData::File.new("path/to/file")})
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Multipart-Uploads
# https://gitlab.com/os85/httpx/wikis/Multipart-Uploads
#
module Multipart
MULTIPART_VALUE_COND = lambda do |value|
@ -29,7 +29,7 @@ module HTTPX
# in order not to break legacy code, we'll keep loading http/form_data for them.
require "http/form_data"
warn "httpx: http/form_data is no longer a requirement to use HTTPX :multipart plugin. See migration instructions under" \
"https://honeyryderchuck.gitlab.io/httpx/wiki/Multipart-Uploads.html#notes. \n\n" \
"https://os85.gitlab.io/httpx/wiki/Multipart-Uploads.html#notes. \n\n" \
"If you'd like to stop seeing this message, require 'http/form_data' yourself."
end
rescue LoadError

View File

@ -38,7 +38,7 @@ module HTTPX::Plugins
EXTENDED_OTHER_VALUE = /%[0-9a-fA-F]{2}|#{ATTRIBUTE_CHAR}/.freeze
EXTENDED_OTHER_PARAMETER = /(#{EXTENDED_OTHER_NAME})=(#{EXTENDED_OTHER_VALUE}*)/.freeze
EXTENDED_INITIAL_NAME = /#{ATTRIBUTE}(?:\*0)?\*/.freeze
EXTENDED_INITIAL_VALUE = /[a-zA-Z0-9\-]*'[a-zA-Z0-9\-]*'#{EXTENDED_OTHER_VALUE}*/.freeze
EXTENDED_INITIAL_VALUE = /[a-zA-Z0-9-]*'[a-zA-Z0-9-]*'#{EXTENDED_OTHER_VALUE}*/.freeze
EXTENDED_INITIAL_PARAMETER = /(#{EXTENDED_INITIAL_NAME})=(#{EXTENDED_INITIAL_VALUE})/.freeze
EXTENDED_PARAMETER = /#{EXTENDED_INITIAL_PARAMETER}|#{EXTENDED_OTHER_PARAMETER}/.freeze
DISPPARM = /;\s*(?:#{REGULAR_PARAMETER}|#{EXTENDED_PARAMETER})\s*/.freeze

View File

@ -3,7 +3,7 @@
module HTTPX
module Plugins
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Authentication#ntlm-authentication
# https://gitlab.com/os85/httpx/wikis/Authentication#ntlm-authentication
#
module NTLMAuth
class << self

View File

@ -15,7 +15,7 @@ module HTTPX
# This plugin is also not recommendable when connecting to >9000 (like, a lot) different origins.
# So when you use this, make sure that you don't fall into this trap.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Persistent
# https://gitlab.com/os85/httpx/wikis/Persistent
#
module Persistent
def self.load_dependencies(klass)

View File

@ -12,7 +12,7 @@ module HTTPX
# * Socks4/4a proxies
# * Socks5 proxies
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Proxy
# https://gitlab.com/os85/httpx/wikis/Proxy
#
module Proxy
Error = HTTPProxyError

View File

@ -8,7 +8,7 @@ module HTTPX
# In order to benefit from this, requests are sent one at a time, so that
# no push responses are received after corresponding request has been sent.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Server-Push
# https://gitlab.com/os85/httpx/wikis/Server-Push
#
module PushPromise
def self.extra_options(options)

View File

@ -9,7 +9,7 @@ module HTTPX
# * when the server is unavailable (503);
# * when a 3xx request comes with a "retry-after" value
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/RateLimiter
# https://gitlab.com/os85/httpx/wikis/RateLimiter
#
module RateLimiter
class << self

View File

@ -5,7 +5,7 @@ module HTTPX
#
# This plugin adds support for retrying requests when certain errors happen.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Response-Cache
# https://gitlab.com/os85/httpx/wikis/Response-Cache
#
module ResponseCache
CACHEABLE_VERBS = %i[get head].freeze

View File

@ -5,7 +5,7 @@ module HTTPX
#
# This plugin adds support for retrying requests when certain errors happen.
#
# https://gitlab.com/honeyryderchuck/httpx/wikis/Retries
# https://gitlab.com/os85/httpx/wikis/Retries
#
module Retries
MAX_RETRIES = 3

View File

@ -1,8 +1,8 @@
## how to build and publish new version of nghttp2 container
```
> docker build -f test/support/ci/Dockerfile.nghttp2 -t registry.gitlab.com/honeyryderchuck/httpx/nghttp2:latest .
> docker login -u HoneyryderChuck --password-stdin registry.gitlab.com/honeyryderchuck/httpx/nghttp2:latest
> docker push registry.gitlab.com/honeyryderchuck/httpx/nghttp2:latest
> docker build -f test/support/ci/Dockerfile.nghttp2 -t registry.gitlab.com/os85/httpx/nghttp2:latest .
> docker login -u HoneyryderChuck --password-stdin registry.gitlab.com/os85/httpx/nghttp2:latest
> docker push registry.gitlab.com/os85/httpx/nghttp2:latest
```

View File

@ -14,10 +14,10 @@ if [[ "$RUBY_ENGINE" = "truffleruby" ]]; then
elif [[ "$RUBY_PLATFORM" = "java" ]]; then
apt-get update && apt-get install -y build-essential iptables iproute2 file idn2 git
elif [[ ${RUBY_VERSION:0:3} = "2.1" ]]; then
apt-get update && apt-get install -y libsodium-dev iptables iproute2 libmagic-dev shared-mime-info
apt-get update && apt-get install -y --force-yes libsodium-dev iptables iproute2 libmagic-dev shared-mime-info
IPTABLES=iptables
elif [[ ${RUBY_VERSION:0:3} = "2.2" ]]; then
apt-get update && apt-get install -y iptables iproute2 libmagic-dev shared-mime-info
apt-get update && apt-get install -y --force-yes iptables iproute2 libmagic-dev shared-mime-info
IPTABLES=iptables
elif [[ ${RUBY_VERSION:0:3} = "2.3" ]]; then
# installing custom openssl