http 3.1.0 → 5.3.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 +5 -5
- data/.github/workflows/ci.yml +67 -0
- data/.gitignore +6 -9
- data/.rspec +0 -4
- data/.rubocop/layout.yml +8 -0
- data/.rubocop/metrics.yml +4 -0
- data/.rubocop/rspec.yml +9 -0
- data/.rubocop/style.yml +32 -0
- data/.rubocop.yml +9 -108
- data/.rubocop_todo.yml +219 -0
- data/.yardopts +1 -1
- data/CHANGELOG.md +67 -0
- data/{CHANGES.md → CHANGES_OLD.md} +358 -0
- data/Gemfile +19 -10
- data/LICENSE.txt +1 -1
- data/README.md +53 -85
- data/Rakefile +3 -11
- data/SECURITY.md +17 -0
- data/http.gemspec +15 -6
- data/lib/http/base64.rb +12 -0
- data/lib/http/chainable.rb +71 -41
- data/lib/http/client.rb +73 -52
- data/lib/http/connection.rb +28 -18
- data/lib/http/content_type.rb +12 -7
- data/lib/http/errors.rb +19 -0
- data/lib/http/feature.rb +18 -1
- data/lib/http/features/auto_deflate.rb +27 -6
- data/lib/http/features/auto_inflate.rb +32 -6
- data/lib/http/features/instrumentation.rb +69 -0
- data/lib/http/features/logging.rb +53 -0
- data/lib/http/features/normalize_uri.rb +17 -0
- data/lib/http/features/raise_error.rb +22 -0
- data/lib/http/headers/known.rb +3 -0
- data/lib/http/headers/normalizer.rb +69 -0
- data/lib/http/headers.rb +72 -49
- data/lib/http/mime_type/adapter.rb +3 -1
- data/lib/http/mime_type/json.rb +1 -0
- data/lib/http/options.rb +31 -28
- data/lib/http/redirector.rb +56 -4
- data/lib/http/request/body.rb +31 -0
- data/lib/http/request/writer.rb +29 -9
- data/lib/http/request.rb +76 -41
- data/lib/http/response/body.rb +6 -4
- data/lib/http/response/inflater.rb +1 -1
- data/lib/http/response/parser.rb +78 -26
- data/lib/http/response/status.rb +4 -3
- data/lib/http/response.rb +45 -27
- data/lib/http/retriable/client.rb +37 -0
- data/lib/http/retriable/delay_calculator.rb +64 -0
- data/lib/http/retriable/errors.rb +14 -0
- data/lib/http/retriable/performer.rb +153 -0
- data/lib/http/timeout/global.rb +29 -47
- data/lib/http/timeout/null.rb +12 -8
- data/lib/http/timeout/per_operation.rb +32 -57
- data/lib/http/uri.rb +75 -1
- data/lib/http/version.rb +1 -1
- data/lib/http.rb +2 -2
- data/spec/lib/http/client_spec.rb +189 -36
- data/spec/lib/http/connection_spec.rb +31 -6
- data/spec/lib/http/features/auto_inflate_spec.rb +40 -23
- data/spec/lib/http/features/instrumentation_spec.rb +81 -0
- data/spec/lib/http/features/logging_spec.rb +65 -0
- data/spec/lib/http/features/raise_error_spec.rb +62 -0
- data/spec/lib/http/headers/normalizer_spec.rb +52 -0
- data/spec/lib/http/headers_spec.rb +53 -18
- data/spec/lib/http/options/headers_spec.rb +6 -2
- data/spec/lib/http/options/merge_spec.rb +16 -16
- data/spec/lib/http/redirector_spec.rb +147 -3
- data/spec/lib/http/request/body_spec.rb +71 -4
- data/spec/lib/http/request/writer_spec.rb +45 -2
- data/spec/lib/http/request_spec.rb +11 -5
- data/spec/lib/http/response/body_spec.rb +5 -5
- data/spec/lib/http/response/parser_spec.rb +74 -0
- data/spec/lib/http/response/status_spec.rb +3 -3
- data/spec/lib/http/response_spec.rb +83 -7
- data/spec/lib/http/retriable/delay_calculator_spec.rb +69 -0
- data/spec/lib/http/retriable/performer_spec.rb +302 -0
- data/spec/lib/http/uri/normalizer_spec.rb +95 -0
- data/spec/lib/http/uri_spec.rb +39 -0
- data/spec/lib/http_spec.rb +121 -68
- data/spec/regression_specs.rb +7 -0
- data/spec/spec_helper.rb +22 -21
- data/spec/support/black_hole.rb +1 -1
- data/spec/support/dummy_server/servlet.rb +42 -11
- data/spec/support/dummy_server.rb +9 -8
- data/spec/support/fuubar.rb +21 -0
- data/spec/support/http_handling_shared.rb +62 -66
- data/spec/support/simplecov.rb +19 -0
- data/spec/support/ssl_helper.rb +4 -4
- metadata +66 -27
- data/.coveralls.yml +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -36
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b6053cab7210860d3464e9441746186b46c7ac1dc5716ea59cc69dff0d4ef460
|
|
4
|
+
data.tar.gz: 49f6d6c66a674e792208f1c17fff2c5dd8fdda330c6bdbabbaddec1f69eebac8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11585d59c45a6e762e6df8792e30107ec1011440ddc4597ad63f4ab5951f0e5c3fd801153bdb32bf74cae90c8ca716368003b3fb59cd98d8dc28c595899be177
|
|
7
|
+
data.tar.gz: 481d4f96d65e80226f505b93ff0da954ee4d0c3ee443d6dd4b72711cd0b44ae95c150eeb82d24442a34105dbb75013cb689f4b2ee0a2272d8320b473d91fc72d
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, 5-x-stable ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, 5-x-stable ]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
BUNDLE_WITHOUT: "development"
|
|
11
|
+
JRUBY_OPTS: "--dev --debug"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
ruby: [ ruby-2.6, ruby-2.7, ruby-3.0, ruby-3.1, ruby-3.2, ruby-3.3 ]
|
|
20
|
+
os: [ ubuntu-latest ]
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: ruby/setup-ruby@v1
|
|
26
|
+
with:
|
|
27
|
+
ruby-version: ${{ matrix.ruby }}
|
|
28
|
+
bundler-cache: true
|
|
29
|
+
|
|
30
|
+
- name: bundle exec rspec
|
|
31
|
+
run: bundle exec rspec --format progress --force-colour
|
|
32
|
+
|
|
33
|
+
test-flaky:
|
|
34
|
+
runs-on: ${{ matrix.os }}
|
|
35
|
+
|
|
36
|
+
strategy:
|
|
37
|
+
matrix:
|
|
38
|
+
ruby: [ jruby-9.3 ]
|
|
39
|
+
os: [ ubuntu-latest ]
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
|
|
44
|
+
- uses: ruby/setup-ruby@v1
|
|
45
|
+
with:
|
|
46
|
+
ruby-version: ${{ matrix.ruby }}
|
|
47
|
+
bundler-cache: true
|
|
48
|
+
|
|
49
|
+
- name: bundle exec rspec
|
|
50
|
+
continue-on-error: true
|
|
51
|
+
run: bundle exec rspec --format progress --force-colour
|
|
52
|
+
|
|
53
|
+
lint:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
- uses: ruby/setup-ruby@v1
|
|
60
|
+
with:
|
|
61
|
+
ruby-version: 2.6
|
|
62
|
+
bundler-cache: true
|
|
63
|
+
|
|
64
|
+
- name: bundle exec rubocop
|
|
65
|
+
run: bundle exec rubocop --format progress --color
|
|
66
|
+
|
|
67
|
+
- run: bundle exec rake verify_measurements
|
data/.gitignore
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
*.gem
|
|
2
|
-
.bundle
|
|
3
2
|
.config
|
|
4
3
|
.rvmrc
|
|
5
4
|
.yardoc
|
|
6
|
-
Gemfile.lock
|
|
7
5
|
InstalledFiles
|
|
8
6
|
_yardoc
|
|
9
|
-
|
|
7
|
+
|
|
8
|
+
.bundle
|
|
9
|
+
.ruby-version
|
|
10
10
|
doc
|
|
11
|
-
|
|
12
|
-
measurement
|
|
11
|
+
coverage
|
|
13
12
|
pkg
|
|
14
|
-
|
|
15
|
-
spec/reports
|
|
16
|
-
test/tmp
|
|
17
|
-
test/version_tmp
|
|
13
|
+
spec/examples.txt
|
|
18
14
|
tmp
|
|
15
|
+
Gemfile.lock
|
data/.rspec
CHANGED
data/.rubocop/layout.yml
ADDED
data/.rubocop/rspec.yml
ADDED
data/.rubocop/style.yml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Style/Documentation:
|
|
2
|
+
Enabled: false
|
|
3
|
+
|
|
4
|
+
Style/DocumentDynamicEvalDefinition:
|
|
5
|
+
Enabled: true
|
|
6
|
+
Exclude:
|
|
7
|
+
- 'spec/**/*.rb'
|
|
8
|
+
|
|
9
|
+
Style/FormatStringToken:
|
|
10
|
+
Enabled: true
|
|
11
|
+
EnforcedStyle: unannotated
|
|
12
|
+
|
|
13
|
+
Style/HashSyntax:
|
|
14
|
+
Enabled: true
|
|
15
|
+
EnforcedStyle: hash_rockets
|
|
16
|
+
|
|
17
|
+
Style/OptionHash:
|
|
18
|
+
Enabled: true
|
|
19
|
+
|
|
20
|
+
Style/RescueStandardError:
|
|
21
|
+
Enabled: true
|
|
22
|
+
EnforcedStyle: implicit
|
|
23
|
+
|
|
24
|
+
Style/StringLiterals:
|
|
25
|
+
Enabled: true
|
|
26
|
+
EnforcedStyle: double_quotes
|
|
27
|
+
|
|
28
|
+
Style/WordArray:
|
|
29
|
+
Enabled: true
|
|
30
|
+
|
|
31
|
+
Style/YodaCondition:
|
|
32
|
+
Enabled: false
|
data/.rubocop.yml
CHANGED
|
@@ -1,110 +1,11 @@
|
|
|
1
|
+
inherit_from:
|
|
2
|
+
- .rubocop_todo.yml
|
|
3
|
+
- .rubocop/layout.yml
|
|
4
|
+
- .rubocop/metrics.yml
|
|
5
|
+
- .rubocop/style.yml
|
|
6
|
+
|
|
1
7
|
AllCops:
|
|
8
|
+
DefaultFormatter: fuubar
|
|
2
9
|
DisplayCopNames: true
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Layout/DotPosition:
|
|
7
|
-
EnforcedStyle: trailing
|
|
8
|
-
|
|
9
|
-
Layout/SpaceAroundOperators:
|
|
10
|
-
AllowForAlignment: true
|
|
11
|
-
|
|
12
|
-
Layout/SpaceInsideHashLiteralBraces:
|
|
13
|
-
EnforcedStyle: no_space
|
|
14
|
-
|
|
15
|
-
## Metrics #####################################################################
|
|
16
|
-
|
|
17
|
-
Metrics/AbcSize:
|
|
18
|
-
Enabled: false
|
|
19
|
-
|
|
20
|
-
Metrics/BlockLength:
|
|
21
|
-
Exclude:
|
|
22
|
-
- spec/**/*
|
|
23
|
-
|
|
24
|
-
Metrics/BlockNesting:
|
|
25
|
-
Max: 2
|
|
26
|
-
|
|
27
|
-
Metrics/ClassLength:
|
|
28
|
-
CountComments: false
|
|
29
|
-
Max: 125
|
|
30
|
-
|
|
31
|
-
# TODO: Lower to 6
|
|
32
|
-
Metrics/CyclomaticComplexity:
|
|
33
|
-
Max: 8
|
|
34
|
-
|
|
35
|
-
Metrics/PerceivedComplexity:
|
|
36
|
-
Max: 8
|
|
37
|
-
|
|
38
|
-
# TODO: Lower to 80
|
|
39
|
-
Metrics/LineLength:
|
|
40
|
-
AllowURI: true
|
|
41
|
-
Max: 143
|
|
42
|
-
|
|
43
|
-
# TODO: Lower to 15
|
|
44
|
-
Metrics/MethodLength:
|
|
45
|
-
CountComments: false
|
|
46
|
-
Max: 25
|
|
47
|
-
|
|
48
|
-
Metrics/ModuleLength:
|
|
49
|
-
CountComments: false
|
|
50
|
-
Max: 120
|
|
51
|
-
|
|
52
|
-
Metrics/ParameterLists:
|
|
53
|
-
Max: 5
|
|
54
|
-
CountKeywordArgs: true
|
|
55
|
-
|
|
56
|
-
## Performance #################################################################
|
|
57
|
-
|
|
58
|
-
# XXX: requires ruby 2.4+
|
|
59
|
-
Performance/RegexpMatch:
|
|
60
|
-
Enabled: false
|
|
61
|
-
|
|
62
|
-
## Style #######################################################################
|
|
63
|
-
|
|
64
|
-
Style/CollectionMethods:
|
|
65
|
-
PreferredMethods:
|
|
66
|
-
collect: 'map'
|
|
67
|
-
reduce: 'inject'
|
|
68
|
-
find: 'detect'
|
|
69
|
-
find_all: 'select'
|
|
70
|
-
|
|
71
|
-
Style/Documentation:
|
|
72
|
-
Enabled: false
|
|
73
|
-
|
|
74
|
-
Style/DoubleNegation:
|
|
75
|
-
Enabled: false
|
|
76
|
-
|
|
77
|
-
Style/EachWithObject:
|
|
78
|
-
Enabled: false
|
|
79
|
-
|
|
80
|
-
Style/Encoding:
|
|
81
|
-
Enabled: false
|
|
82
|
-
|
|
83
|
-
Style/EmptyCaseCondition:
|
|
84
|
-
Enabled: false
|
|
85
|
-
|
|
86
|
-
# XXX: Lots of times it suggests making code terrible to read.
|
|
87
|
-
Style/GuardClause:
|
|
88
|
-
Enabled: false
|
|
89
|
-
|
|
90
|
-
Style/HashSyntax:
|
|
91
|
-
EnforcedStyle: hash_rockets
|
|
92
|
-
|
|
93
|
-
Style/Lambda:
|
|
94
|
-
Enabled: false
|
|
95
|
-
|
|
96
|
-
Style/OptionHash:
|
|
97
|
-
Enabled: true
|
|
98
|
-
|
|
99
|
-
# XXX: requires ruby 2.3+
|
|
100
|
-
Style/SafeNavigation:
|
|
101
|
-
Enabled: false
|
|
102
|
-
|
|
103
|
-
Style/StringLiterals:
|
|
104
|
-
EnforcedStyle: double_quotes
|
|
105
|
-
|
|
106
|
-
Style/TrivialAccessors:
|
|
107
|
-
Enabled: false
|
|
108
|
-
|
|
109
|
-
Style/YodaCondition:
|
|
110
|
-
Enabled: false
|
|
10
|
+
NewCops: enable
|
|
11
|
+
TargetRubyVersion: 2.6
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100`
|
|
3
|
+
# on 2025-06-09 02:44:43 UTC using RuboCop version 1.30.1.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: Include.
|
|
12
|
+
# Include: **/*.gemspec
|
|
13
|
+
Gemspec/DeprecatedAttributeAssignment:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'http.gemspec'
|
|
16
|
+
|
|
17
|
+
# Offense count: 55
|
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
19
|
+
# Configuration parameters: EnforcedStyle.
|
|
20
|
+
# SupportedStyles: leading, trailing
|
|
21
|
+
Layout/DotPosition:
|
|
22
|
+
Exclude:
|
|
23
|
+
- 'lib/http/options.rb'
|
|
24
|
+
- 'spec/lib/http/client_spec.rb'
|
|
25
|
+
- 'spec/lib/http/features/auto_deflate_spec.rb'
|
|
26
|
+
- 'spec/lib/http/headers_spec.rb'
|
|
27
|
+
- 'spec/lib/http/options/features_spec.rb'
|
|
28
|
+
- 'spec/lib/http/redirector_spec.rb'
|
|
29
|
+
- 'spec/lib/http/response/body_spec.rb'
|
|
30
|
+
- 'spec/lib/http_spec.rb'
|
|
31
|
+
- 'spec/support/http_handling_shared.rb'
|
|
32
|
+
|
|
33
|
+
# Offense count: 2
|
|
34
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
35
|
+
# Configuration parameters: IndentationWidth.
|
|
36
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
37
|
+
Layout/FirstHashElementIndentation:
|
|
38
|
+
EnforcedStyle: consistent
|
|
39
|
+
|
|
40
|
+
# Offense count: 206
|
|
41
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
42
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
|
43
|
+
# SupportedStyles: space, no_space, compact
|
|
44
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
|
45
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
46
|
+
Exclude:
|
|
47
|
+
- 'lib/http/chainable.rb'
|
|
48
|
+
- 'spec/lib/http/client_spec.rb'
|
|
49
|
+
- 'spec/lib/http/features/auto_inflate_spec.rb'
|
|
50
|
+
- 'spec/lib/http/features/instrumentation_spec.rb'
|
|
51
|
+
- 'spec/lib/http/features/logging_spec.rb'
|
|
52
|
+
- 'spec/lib/http/headers_spec.rb'
|
|
53
|
+
- 'spec/lib/http/options/features_spec.rb'
|
|
54
|
+
- 'spec/lib/http/options/merge_spec.rb'
|
|
55
|
+
- 'spec/lib/http/options/new_spec.rb'
|
|
56
|
+
- 'spec/lib/http/redirector_spec.rb'
|
|
57
|
+
- 'spec/lib/http/request_spec.rb'
|
|
58
|
+
- 'spec/lib/http/response_spec.rb'
|
|
59
|
+
- 'spec/lib/http_spec.rb'
|
|
60
|
+
- 'spec/support/dummy_server/servlet.rb'
|
|
61
|
+
- 'spec/support/http_handling_shared.rb'
|
|
62
|
+
- 'spec/support/ssl_helper.rb'
|
|
63
|
+
|
|
64
|
+
# Offense count: 4
|
|
65
|
+
Lint/MissingSuper:
|
|
66
|
+
Exclude:
|
|
67
|
+
- 'lib/http/features/auto_deflate.rb'
|
|
68
|
+
- 'lib/http/features/instrumentation.rb'
|
|
69
|
+
- 'lib/http/features/logging.rb'
|
|
70
|
+
- 'lib/http/features/normalize_uri.rb'
|
|
71
|
+
|
|
72
|
+
# Offense count: 1
|
|
73
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
74
|
+
Lint/RedundantCopDisableDirective:
|
|
75
|
+
Exclude:
|
|
76
|
+
- 'spec/lib/http/retriable/performer_spec.rb'
|
|
77
|
+
|
|
78
|
+
# Offense count: 6
|
|
79
|
+
# Configuration parameters: AllowComments, AllowNil.
|
|
80
|
+
Lint/SuppressedException:
|
|
81
|
+
Exclude:
|
|
82
|
+
- 'spec/lib/http/retriable/performer_spec.rb'
|
|
83
|
+
|
|
84
|
+
# Offense count: 8
|
|
85
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes, Max.
|
|
86
|
+
Metrics/AbcSize:
|
|
87
|
+
Exclude:
|
|
88
|
+
- 'lib/http/chainable.rb'
|
|
89
|
+
- 'lib/http/client.rb'
|
|
90
|
+
- 'lib/http/connection.rb'
|
|
91
|
+
- 'lib/http/features/auto_deflate.rb'
|
|
92
|
+
- 'lib/http/redirector.rb'
|
|
93
|
+
- 'lib/http/request.rb'
|
|
94
|
+
- 'lib/http/response.rb'
|
|
95
|
+
|
|
96
|
+
# Offense count: 4
|
|
97
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
98
|
+
Metrics/ClassLength:
|
|
99
|
+
Exclude:
|
|
100
|
+
- 'lib/http/client.rb'
|
|
101
|
+
- 'lib/http/connection.rb'
|
|
102
|
+
- 'lib/http/headers.rb'
|
|
103
|
+
- 'lib/http/request.rb'
|
|
104
|
+
|
|
105
|
+
# Offense count: 2
|
|
106
|
+
# Configuration parameters: IgnoredMethods, Max.
|
|
107
|
+
Metrics/CyclomaticComplexity:
|
|
108
|
+
Exclude:
|
|
109
|
+
- 'lib/http/chainable.rb'
|
|
110
|
+
- 'lib/http/client.rb'
|
|
111
|
+
|
|
112
|
+
# Offense count: 19
|
|
113
|
+
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
|
|
114
|
+
Metrics/MethodLength:
|
|
115
|
+
Exclude:
|
|
116
|
+
- 'lib/http/chainable.rb'
|
|
117
|
+
- 'lib/http/client.rb'
|
|
118
|
+
- 'lib/http/connection.rb'
|
|
119
|
+
- 'lib/http/features/auto_deflate.rb'
|
|
120
|
+
- 'lib/http/features/auto_inflate.rb'
|
|
121
|
+
- 'lib/http/headers.rb'
|
|
122
|
+
- 'lib/http/options.rb'
|
|
123
|
+
- 'lib/http/redirector.rb'
|
|
124
|
+
- 'lib/http/request.rb'
|
|
125
|
+
- 'lib/http/response.rb'
|
|
126
|
+
- 'lib/http/response/body.rb'
|
|
127
|
+
- 'lib/http/retriable/performer.rb'
|
|
128
|
+
- 'lib/http/timeout/global.rb'
|
|
129
|
+
|
|
130
|
+
# Offense count: 1
|
|
131
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
132
|
+
Metrics/ModuleLength:
|
|
133
|
+
Exclude:
|
|
134
|
+
- 'lib/http/chainable.rb'
|
|
135
|
+
|
|
136
|
+
# Offense count: 1
|
|
137
|
+
Security/CompoundHash:
|
|
138
|
+
Exclude:
|
|
139
|
+
- 'lib/http/uri.rb'
|
|
140
|
+
|
|
141
|
+
# Offense count: 2
|
|
142
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
143
|
+
# Configuration parameters: EnforcedStyle.
|
|
144
|
+
# SupportedStyles: separated, grouped
|
|
145
|
+
Style/AccessorGrouping:
|
|
146
|
+
Exclude:
|
|
147
|
+
- 'lib/http/request.rb'
|
|
148
|
+
|
|
149
|
+
# Offense count: 4
|
|
150
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
151
|
+
Style/EmptyCaseCondition:
|
|
152
|
+
Exclude:
|
|
153
|
+
- 'lib/http/client.rb'
|
|
154
|
+
- 'lib/http/headers.rb'
|
|
155
|
+
- 'lib/http/options.rb'
|
|
156
|
+
- 'lib/http/response/status.rb'
|
|
157
|
+
|
|
158
|
+
# Offense count: 5
|
|
159
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
160
|
+
Style/Encoding:
|
|
161
|
+
Exclude:
|
|
162
|
+
- 'spec/lib/http/client_spec.rb'
|
|
163
|
+
- 'spec/lib/http/request/writer_spec.rb'
|
|
164
|
+
- 'spec/lib/http/request_spec.rb'
|
|
165
|
+
- 'spec/lib/http_spec.rb'
|
|
166
|
+
- 'spec/support/dummy_server/servlet.rb'
|
|
167
|
+
|
|
168
|
+
# Offense count: 71
|
|
169
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
170
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
171
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
172
|
+
# SupportedShorthandSyntax: always, never, either
|
|
173
|
+
Style/HashSyntax:
|
|
174
|
+
Exclude:
|
|
175
|
+
- 'spec/lib/http/features/raise_error_spec.rb'
|
|
176
|
+
- 'spec/lib/http/retriable/delay_calculator_spec.rb'
|
|
177
|
+
- 'spec/lib/http/retriable/performer_spec.rb'
|
|
178
|
+
- 'spec/lib/http_spec.rb'
|
|
179
|
+
|
|
180
|
+
# Offense count: 4
|
|
181
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
182
|
+
# Configuration parameters: EnforcedStyle.
|
|
183
|
+
# SupportedStyles: literals, strict
|
|
184
|
+
Style/MutableConstant:
|
|
185
|
+
Exclude:
|
|
186
|
+
- 'lib/http/headers/normalizer.rb'
|
|
187
|
+
- 'lib/http/retriable/delay_calculator.rb'
|
|
188
|
+
|
|
189
|
+
# Offense count: 17
|
|
190
|
+
# Configuration parameters: SuspiciousParamNames, Allowlist.
|
|
191
|
+
# SuspiciousParamNames: options, opts, args, params, parameters
|
|
192
|
+
Style/OptionHash:
|
|
193
|
+
Exclude:
|
|
194
|
+
- 'lib/http/chainable.rb'
|
|
195
|
+
- 'lib/http/client.rb'
|
|
196
|
+
- 'lib/http/feature.rb'
|
|
197
|
+
- 'lib/http/options.rb'
|
|
198
|
+
- 'lib/http/redirector.rb'
|
|
199
|
+
- 'lib/http/timeout/null.rb'
|
|
200
|
+
- 'spec/support/dummy_server.rb'
|
|
201
|
+
|
|
202
|
+
# Offense count: 4
|
|
203
|
+
# Configuration parameters: AllowedMethods.
|
|
204
|
+
# AllowedMethods: respond_to_missing?
|
|
205
|
+
Style/OptionalBooleanParameter:
|
|
206
|
+
Exclude:
|
|
207
|
+
- 'lib/http/timeout/global.rb'
|
|
208
|
+
- 'lib/http/timeout/null.rb'
|
|
209
|
+
- 'lib/http/timeout/per_operation.rb'
|
|
210
|
+
- 'lib/http/uri.rb'
|
|
211
|
+
|
|
212
|
+
# Offense count: 3
|
|
213
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
214
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
|
215
|
+
# URISchemes: http, https
|
|
216
|
+
Layout/LineLength:
|
|
217
|
+
Exclude:
|
|
218
|
+
- 'lib/http/chainable.rb'
|
|
219
|
+
- 'spec/lib/http/options/proxy_spec.rb'
|
data/.yardopts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
--markup-provider=
|
|
1
|
+
--markup-provider=kramdown
|
|
2
2
|
--markup=markdown
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [5.3.1] - 2025-06-09
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Revert switch to the native llhttp on MRI, as it's not compatible with
|
|
16
|
+
standalone bundles
|
|
17
|
+
([#802](https://github.com/httprb/http/issues/802))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [5.3.0] - 2025-06-09
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- (backported) Add .retriable feature to Http
|
|
25
|
+
- (backported) Add more specific ConnectionError classes
|
|
26
|
+
- (backported) New feature: RaiseError
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- (backported) Drop depenency on base64
|
|
31
|
+
- (backported) Cache header normalization to reduce object allocation
|
|
32
|
+
- (backported) Use native llhttp on MRI
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## [5.2.0] - 2024-02-05
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Add `Connection#finished_request?`
|
|
40
|
+
([#743](https://github.com/httprb/http/pull/743))
|
|
41
|
+
- Add `Instrumentation#on_error`
|
|
42
|
+
([#746](https://github.com/httprb/http/pull/746))
|
|
43
|
+
- Add `base64` dependency (suppresses warnings on Ruby 3.0)
|
|
44
|
+
([#759](https://github.com/httprb/http/pull/759))
|
|
45
|
+
- Add `PURGE` HTTP verb
|
|
46
|
+
([#757](https://github.com/httprb/http/pull/757))
|
|
47
|
+
- Add Ruby-3.3 support
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **BREAKING** Process features in reverse order
|
|
52
|
+
([#766](https://github.com/httprb/http/pull/766))
|
|
53
|
+
- **BREAKING** Downcase Content-Type charset name
|
|
54
|
+
([#753](https://github.com/httprb/http/pull/753))
|
|
55
|
+
- **BREAKING** Make URI normalization more conservative
|
|
56
|
+
([#758](https://github.com/httprb/http/pull/758))
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- Close sockets on initialize failure
|
|
61
|
+
([#762](https://github.com/httprb/http/pull/762))
|
|
62
|
+
- Prevent CRLF injection due to broken URL normalizer
|
|
63
|
+
([#765](https://github.com/httprb/http/pull/765))
|
|
64
|
+
|
|
65
|
+
[unreleased]: https://github.com/httprb/http/compare/v5.3.0...5-x-stable
|
|
66
|
+
[5.3.0]: https://github.com/httprb/http/compare/v5.2.0...v5.3.0
|
|
67
|
+
[5.2.0]: https://github.com/httprb/http/compare/v5.1.1...v5.2.0
|