http 4.4.1 → 5.1.0
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/.github/workflows/ci.yml +65 -0
- data/.gitignore +6 -10
- data/.rspec +0 -4
- data/.rubocop/layout.yml +8 -0
- data/.rubocop/style.yml +32 -0
- data/.rubocop.yml +8 -110
- data/.rubocop_todo.yml +205 -0
- data/.yardopts +1 -1
- data/CHANGES.md +188 -3
- data/Gemfile +18 -10
- data/LICENSE.txt +1 -1
- data/README.md +47 -86
- data/Rakefile +2 -10
- data/SECURITY.md +5 -0
- data/http.gemspec +9 -8
- data/lib/http/chainable.rb +23 -17
- data/lib/http/client.rb +44 -34
- data/lib/http/connection.rb +11 -7
- data/lib/http/content_type.rb +12 -7
- data/lib/http/errors.rb +3 -0
- data/lib/http/feature.rb +3 -1
- data/lib/http/features/auto_deflate.rb +6 -6
- data/lib/http/features/auto_inflate.rb +6 -7
- data/lib/http/features/instrumentation.rb +1 -1
- data/lib/http/features/logging.rb +19 -21
- data/lib/http/headers.rb +50 -13
- data/lib/http/mime_type/adapter.rb +3 -1
- data/lib/http/mime_type/json.rb +1 -0
- data/lib/http/options.rb +5 -8
- data/lib/http/redirector.rb +51 -2
- data/lib/http/request/body.rb +1 -0
- data/lib/http/request/writer.rb +9 -4
- data/lib/http/request.rb +28 -11
- data/lib/http/response/body.rb +6 -4
- data/lib/http/response/inflater.rb +1 -1
- data/lib/http/response/parser.rb +74 -62
- data/lib/http/response/status.rb +4 -3
- data/lib/http/response.rb +44 -18
- data/lib/http/timeout/global.rb +20 -36
- data/lib/http/timeout/null.rb +2 -1
- data/lib/http/timeout/per_operation.rb +32 -55
- data/lib/http/uri.rb +5 -5
- data/lib/http/version.rb +1 -1
- data/spec/lib/http/client_spec.rb +153 -30
- data/spec/lib/http/connection_spec.rb +8 -5
- data/spec/lib/http/features/auto_inflate_spec.rb +3 -2
- data/spec/lib/http/features/instrumentation_spec.rb +27 -21
- data/spec/lib/http/features/logging_spec.rb +8 -10
- data/spec/lib/http/headers_spec.rb +53 -18
- data/spec/lib/http/options/headers_spec.rb +1 -1
- data/spec/lib/http/options/merge_spec.rb +16 -16
- data/spec/lib/http/redirector_spec.rb +107 -3
- data/spec/lib/http/request/body_spec.rb +3 -3
- data/spec/lib/http/request/writer_spec.rb +25 -2
- data/spec/lib/http/request_spec.rb +5 -5
- data/spec/lib/http/response/body_spec.rb +5 -5
- data/spec/lib/http/response/parser_spec.rb +33 -4
- data/spec/lib/http/response/status_spec.rb +3 -3
- data/spec/lib/http/response_spec.rb +80 -3
- data/spec/lib/http_spec.rb +30 -3
- data/spec/spec_helper.rb +21 -21
- data/spec/support/black_hole.rb +1 -1
- data/spec/support/dummy_server/servlet.rb +17 -6
- data/spec/support/dummy_server.rb +7 -7
- data/spec/support/fuubar.rb +21 -0
- data/spec/support/http_handling_shared.rb +5 -5
- data/spec/support/simplecov.rb +19 -0
- data/spec/support/ssl_helper.rb +4 -4
- metadata +23 -15
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3826a20981b5ed6a7e5f29fd99af814a8409dea3d556d8d4f1c1faeee0060211
|
4
|
+
data.tar.gz: 5f1a624d39059a53df7535df9d8094ec2eb17330ce113ee5f8201f028cb08a01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f34965016796ff2864a48d86c45a95db18a5bd118921e9f5ab653b042d53f13332d155238b1b26d28be643b6dffea6f0bf9ac20bbc71bcab05e73e7358ca9b7d
|
7
|
+
data.tar.gz: dfcf6ad46848750d86cb9139b7b0ab9d4ae28624bc7c0d779450f3cfbd8de11dd6ba242855fee759210ffade294743746059157cd1eab4eb69125f644653f5e5
|
@@ -0,0 +1,65 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
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 ]
|
20
|
+
os: [ ubuntu-latest ]
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v3
|
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
|
+
- name: Prepare Coveralls test coverage report
|
34
|
+
uses: coverallsapp/github-action@v1.1.2
|
35
|
+
with:
|
36
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
37
|
+
flag-name: "${{ matrix.ruby }} @${{ matrix.os }}"
|
38
|
+
path-to-lcov: ./coverage/lcov/lcov.info
|
39
|
+
parallel: true
|
40
|
+
|
41
|
+
coveralls:
|
42
|
+
needs: test
|
43
|
+
runs-on: ubuntu-latest
|
44
|
+
steps:
|
45
|
+
- name: Finalize Coveralls test coverage report
|
46
|
+
uses: coverallsapp/github-action@master
|
47
|
+
with:
|
48
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
49
|
+
parallel-finished: true
|
50
|
+
|
51
|
+
lint:
|
52
|
+
runs-on: ubuntu-latest
|
53
|
+
|
54
|
+
steps:
|
55
|
+
- uses: actions/checkout@v3
|
56
|
+
|
57
|
+
- uses: ruby/setup-ruby@v1
|
58
|
+
with:
|
59
|
+
ruby-version: 2.6
|
60
|
+
bundler-cache: true
|
61
|
+
|
62
|
+
- name: bundle exec rubocop
|
63
|
+
run: bundle exec rubocop --format progress --color
|
64
|
+
|
65
|
+
- run: bundle exec rake verify_measurements
|
data/.gitignore
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
*.gem
|
2
|
-
.bundle
|
3
2
|
.config
|
4
3
|
.rvmrc
|
5
|
-
.ruby-version
|
6
4
|
.yardoc
|
7
|
-
Gemfile.lock
|
8
5
|
InstalledFiles
|
9
6
|
_yardoc
|
10
|
-
|
7
|
+
|
8
|
+
.bundle
|
9
|
+
.ruby-version
|
11
10
|
doc
|
12
|
-
|
13
|
-
measurement
|
11
|
+
coverage
|
14
12
|
pkg
|
15
|
-
|
16
|
-
spec/reports
|
17
|
-
test/tmp
|
18
|
-
test/version_tmp
|
13
|
+
spec/examples.txt
|
19
14
|
tmp
|
15
|
+
Gemfile.lock
|
data/.rspec
CHANGED
data/.rubocop/layout.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,112 +1,10 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- .rubocop_todo.yml
|
3
|
+
- .rubocop/layout.yml
|
4
|
+
- .rubocop/style.yml
|
5
|
+
|
1
6
|
AllCops:
|
2
|
-
|
7
|
+
DefaultFormatter: fuubar
|
3
8
|
DisplayCopNames: true
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Layout/DotPosition:
|
8
|
-
EnforcedStyle: trailing
|
9
|
-
|
10
|
-
Layout/SpaceAroundOperators:
|
11
|
-
AllowForAlignment: true
|
12
|
-
|
13
|
-
Layout/SpaceInsideHashLiteralBraces:
|
14
|
-
EnforcedStyle: no_space
|
15
|
-
|
16
|
-
## Metrics #####################################################################
|
17
|
-
|
18
|
-
Metrics/AbcSize:
|
19
|
-
Enabled: false
|
20
|
-
|
21
|
-
Metrics/BlockLength:
|
22
|
-
Exclude:
|
23
|
-
- "spec/**/*"
|
24
|
-
- "**/*.gemspec"
|
25
|
-
|
26
|
-
Metrics/BlockNesting:
|
27
|
-
Max: 2
|
28
|
-
|
29
|
-
Metrics/ClassLength:
|
30
|
-
CountComments: false
|
31
|
-
Max: 125
|
32
|
-
|
33
|
-
# TODO: Lower to 6
|
34
|
-
Metrics/CyclomaticComplexity:
|
35
|
-
Max: 8
|
36
|
-
|
37
|
-
Metrics/PerceivedComplexity:
|
38
|
-
Max: 8
|
39
|
-
|
40
|
-
# TODO: Lower to 80
|
41
|
-
Metrics/LineLength:
|
42
|
-
AllowURI: true
|
43
|
-
Max: 143
|
44
|
-
|
45
|
-
# TODO: Lower to 15
|
46
|
-
Metrics/MethodLength:
|
47
|
-
CountComments: false
|
48
|
-
Max: 25
|
49
|
-
|
50
|
-
Metrics/ModuleLength:
|
51
|
-
CountComments: false
|
52
|
-
Max: 120
|
53
|
-
|
54
|
-
Metrics/ParameterLists:
|
55
|
-
Max: 5
|
56
|
-
CountKeywordArgs: true
|
57
|
-
|
58
|
-
## Performance #################################################################
|
59
|
-
|
60
|
-
# XXX: requires ruby 2.4+
|
61
|
-
Performance/RegexpMatch:
|
62
|
-
Enabled: false
|
63
|
-
|
64
|
-
## Style #######################################################################
|
65
|
-
|
66
|
-
Style/CollectionMethods:
|
67
|
-
PreferredMethods:
|
68
|
-
collect: 'map'
|
69
|
-
reduce: 'inject'
|
70
|
-
find: 'detect'
|
71
|
-
find_all: 'select'
|
72
|
-
|
73
|
-
Style/Documentation:
|
74
|
-
Enabled: false
|
75
|
-
|
76
|
-
Style/DoubleNegation:
|
77
|
-
Enabled: false
|
78
|
-
|
79
|
-
Style/EachWithObject:
|
80
|
-
Enabled: false
|
81
|
-
|
82
|
-
Style/Encoding:
|
83
|
-
Enabled: false
|
84
|
-
|
85
|
-
Style/EmptyCaseCondition:
|
86
|
-
Enabled: false
|
87
|
-
|
88
|
-
# XXX: Lots of times it suggests making code terrible to read.
|
89
|
-
Style/GuardClause:
|
90
|
-
Enabled: false
|
91
|
-
|
92
|
-
Style/HashSyntax:
|
93
|
-
EnforcedStyle: hash_rockets
|
94
|
-
|
95
|
-
Style/Lambda:
|
96
|
-
Enabled: false
|
97
|
-
|
98
|
-
Style/OptionHash:
|
99
|
-
Enabled: true
|
100
|
-
|
101
|
-
# XXX: requires ruby 2.3+
|
102
|
-
Style/SafeNavigation:
|
103
|
-
Enabled: false
|
104
|
-
|
105
|
-
Style/StringLiterals:
|
106
|
-
EnforcedStyle: double_quotes
|
107
|
-
|
108
|
-
Style/TrivialAccessors:
|
109
|
-
Enabled: false
|
110
|
-
|
111
|
-
Style/YodaCondition:
|
112
|
-
Enabled: false
|
9
|
+
NewCops: enable
|
10
|
+
TargetRubyVersion: 2.6
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,205 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100`
|
3
|
+
# on 2022-06-16 14:35:44 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: 53
|
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: 176
|
34
|
+
# This cop supports safe autocorrection (--autocorrect).
|
35
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
36
|
+
# SupportedStyles: space, no_space, compact
|
37
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
38
|
+
Layout/SpaceInsideHashLiteralBraces:
|
39
|
+
Exclude:
|
40
|
+
- 'lib/http/chainable.rb'
|
41
|
+
- 'spec/lib/http/client_spec.rb'
|
42
|
+
- 'spec/lib/http/features/auto_inflate_spec.rb'
|
43
|
+
- 'spec/lib/http/features/instrumentation_spec.rb'
|
44
|
+
- 'spec/lib/http/features/logging_spec.rb'
|
45
|
+
- 'spec/lib/http/headers_spec.rb'
|
46
|
+
- 'spec/lib/http/options/features_spec.rb'
|
47
|
+
- 'spec/lib/http/options/merge_spec.rb'
|
48
|
+
- 'spec/lib/http/options/new_spec.rb'
|
49
|
+
- 'spec/lib/http/redirector_spec.rb'
|
50
|
+
- 'spec/lib/http/request_spec.rb'
|
51
|
+
- 'spec/lib/http/response_spec.rb'
|
52
|
+
- 'spec/lib/http_spec.rb'
|
53
|
+
- 'spec/support/dummy_server/servlet.rb'
|
54
|
+
- 'spec/support/http_handling_shared.rb'
|
55
|
+
- 'spec/support/ssl_helper.rb'
|
56
|
+
|
57
|
+
# Offense count: 4
|
58
|
+
Lint/MissingSuper:
|
59
|
+
Exclude:
|
60
|
+
- 'lib/http/features/auto_deflate.rb'
|
61
|
+
- 'lib/http/features/instrumentation.rb'
|
62
|
+
- 'lib/http/features/logging.rb'
|
63
|
+
- 'lib/http/features/normalize_uri.rb'
|
64
|
+
|
65
|
+
# Offense count: 8
|
66
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes, Max.
|
67
|
+
Metrics/AbcSize:
|
68
|
+
Exclude:
|
69
|
+
- 'lib/http/chainable.rb'
|
70
|
+
- 'lib/http/client.rb'
|
71
|
+
- 'lib/http/connection.rb'
|
72
|
+
- 'lib/http/features/auto_deflate.rb'
|
73
|
+
- 'lib/http/redirector.rb'
|
74
|
+
- 'lib/http/request.rb'
|
75
|
+
- 'lib/http/response.rb'
|
76
|
+
|
77
|
+
# Offense count: 69
|
78
|
+
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
|
79
|
+
# IgnoredMethods: refine
|
80
|
+
Metrics/BlockLength:
|
81
|
+
Exclude:
|
82
|
+
- '**/*.gemspec'
|
83
|
+
- 'spec/lib/http/client_spec.rb'
|
84
|
+
- 'spec/lib/http/connection_spec.rb'
|
85
|
+
- 'spec/lib/http/content_type_spec.rb'
|
86
|
+
- 'spec/lib/http/features/auto_deflate_spec.rb'
|
87
|
+
- 'spec/lib/http/features/auto_inflate_spec.rb'
|
88
|
+
- 'spec/lib/http/features/instrumentation_spec.rb'
|
89
|
+
- 'spec/lib/http/features/logging_spec.rb'
|
90
|
+
- 'spec/lib/http/headers/mixin_spec.rb'
|
91
|
+
- 'spec/lib/http/headers_spec.rb'
|
92
|
+
- 'spec/lib/http/options/merge_spec.rb'
|
93
|
+
- 'spec/lib/http/redirector_spec.rb'
|
94
|
+
- 'spec/lib/http/request/body_spec.rb'
|
95
|
+
- 'spec/lib/http/request/writer_spec.rb'
|
96
|
+
- 'spec/lib/http/request_spec.rb'
|
97
|
+
- 'spec/lib/http/response/body_spec.rb'
|
98
|
+
- 'spec/lib/http/response/parser_spec.rb'
|
99
|
+
- 'spec/lib/http/response/status_spec.rb'
|
100
|
+
- 'spec/lib/http/response_spec.rb'
|
101
|
+
- 'spec/lib/http_spec.rb'
|
102
|
+
- 'spec/support/http_handling_shared.rb'
|
103
|
+
|
104
|
+
# Offense count: 4
|
105
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
106
|
+
Metrics/ClassLength:
|
107
|
+
Exclude:
|
108
|
+
- 'lib/http/client.rb'
|
109
|
+
- 'lib/http/connection.rb'
|
110
|
+
- 'lib/http/headers.rb'
|
111
|
+
- 'lib/http/request.rb'
|
112
|
+
|
113
|
+
# Offense count: 2
|
114
|
+
# Configuration parameters: IgnoredMethods, Max.
|
115
|
+
Metrics/CyclomaticComplexity:
|
116
|
+
Exclude:
|
117
|
+
- 'lib/http/chainable.rb'
|
118
|
+
- 'lib/http/client.rb'
|
119
|
+
|
120
|
+
# Offense count: 18
|
121
|
+
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
|
122
|
+
Metrics/MethodLength:
|
123
|
+
Exclude:
|
124
|
+
- 'lib/http/chainable.rb'
|
125
|
+
- 'lib/http/client.rb'
|
126
|
+
- 'lib/http/connection.rb'
|
127
|
+
- 'lib/http/features/auto_deflate.rb'
|
128
|
+
- 'lib/http/features/auto_inflate.rb'
|
129
|
+
- 'lib/http/headers.rb'
|
130
|
+
- 'lib/http/options.rb'
|
131
|
+
- 'lib/http/redirector.rb'
|
132
|
+
- 'lib/http/request.rb'
|
133
|
+
- 'lib/http/response.rb'
|
134
|
+
- 'lib/http/response/body.rb'
|
135
|
+
- 'lib/http/timeout/global.rb'
|
136
|
+
|
137
|
+
# Offense count: 1
|
138
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
139
|
+
Metrics/ModuleLength:
|
140
|
+
Exclude:
|
141
|
+
- 'lib/http/chainable.rb'
|
142
|
+
|
143
|
+
# Offense count: 1
|
144
|
+
Security/CompoundHash:
|
145
|
+
Exclude:
|
146
|
+
- 'lib/http/uri.rb'
|
147
|
+
|
148
|
+
# Offense count: 2
|
149
|
+
# This cop supports safe autocorrection (--autocorrect).
|
150
|
+
# Configuration parameters: EnforcedStyle.
|
151
|
+
# SupportedStyles: separated, grouped
|
152
|
+
Style/AccessorGrouping:
|
153
|
+
Exclude:
|
154
|
+
- 'lib/http/request.rb'
|
155
|
+
|
156
|
+
# Offense count: 4
|
157
|
+
# This cop supports safe autocorrection (--autocorrect).
|
158
|
+
Style/EmptyCaseCondition:
|
159
|
+
Exclude:
|
160
|
+
- 'lib/http/client.rb'
|
161
|
+
- 'lib/http/headers.rb'
|
162
|
+
- 'lib/http/options.rb'
|
163
|
+
- 'lib/http/response/status.rb'
|
164
|
+
|
165
|
+
# Offense count: 5
|
166
|
+
# This cop supports safe autocorrection (--autocorrect).
|
167
|
+
Style/Encoding:
|
168
|
+
Exclude:
|
169
|
+
- 'spec/lib/http/client_spec.rb'
|
170
|
+
- 'spec/lib/http/request/writer_spec.rb'
|
171
|
+
- 'spec/lib/http/request_spec.rb'
|
172
|
+
- 'spec/lib/http_spec.rb'
|
173
|
+
- 'spec/support/dummy_server/servlet.rb'
|
174
|
+
|
175
|
+
# Offense count: 17
|
176
|
+
# Configuration parameters: SuspiciousParamNames, Allowlist.
|
177
|
+
# SuspiciousParamNames: options, opts, args, params, parameters
|
178
|
+
Style/OptionHash:
|
179
|
+
Exclude:
|
180
|
+
- 'lib/http/chainable.rb'
|
181
|
+
- 'lib/http/client.rb'
|
182
|
+
- 'lib/http/feature.rb'
|
183
|
+
- 'lib/http/options.rb'
|
184
|
+
- 'lib/http/redirector.rb'
|
185
|
+
- 'lib/http/timeout/null.rb'
|
186
|
+
- 'spec/support/dummy_server.rb'
|
187
|
+
|
188
|
+
# Offense count: 4
|
189
|
+
# Configuration parameters: AllowedMethods.
|
190
|
+
# AllowedMethods: respond_to_missing?
|
191
|
+
Style/OptionalBooleanParameter:
|
192
|
+
Exclude:
|
193
|
+
- 'lib/http/timeout/global.rb'
|
194
|
+
- 'lib/http/timeout/null.rb'
|
195
|
+
- 'lib/http/timeout/per_operation.rb'
|
196
|
+
- 'lib/http/uri.rb'
|
197
|
+
|
198
|
+
# Offense count: 3
|
199
|
+
# This cop supports safe autocorrection (--autocorrect).
|
200
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
201
|
+
# URISchemes: http, https
|
202
|
+
Layout/LineLength:
|
203
|
+
Exclude:
|
204
|
+
- 'lib/http/chainable.rb'
|
205
|
+
- '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/CHANGES.md
CHANGED
@@ -1,9 +1,173 @@
|
|
1
|
-
##
|
1
|
+
## 5.1.0 (2022-06-17)
|
2
2
|
|
3
|
-
*
|
4
|
-
|
3
|
+
* Drop ruby-2.5 support.
|
4
|
+
|
5
|
+
* [#715](https://github.com/httprb/http/pull/715)
|
6
|
+
Set default encoding to UTF-8 for `application/json`.
|
7
|
+
([@drwl])
|
8
|
+
|
9
|
+
* [#712](https://github.com/httprb/http/pull/712)
|
10
|
+
Recognize cookies set by redirect.
|
11
|
+
([@tkellogg])
|
12
|
+
|
13
|
+
* [#707](https://github.com/httprb/http/pull/707)
|
14
|
+
Distinguish connection timeouts.
|
15
|
+
([@YuLeven])
|
16
|
+
|
17
|
+
## 5.0.4 (2021-10-07)
|
18
|
+
|
19
|
+
* [#698](https://github.com/httprb/http/pull/698)
|
20
|
+
Fix `HTTP::Timeout::Global#connect_ssl`.
|
21
|
+
([@tarcieri])
|
22
|
+
|
23
|
+
## 5.0.3 (2021-10-06)
|
24
|
+
|
25
|
+
* [#695](https://github.com/httprb/http/pull/695)
|
26
|
+
Revert DNS resolving feature.
|
27
|
+
([@PhilCoggins])
|
28
|
+
|
29
|
+
* [#694](https://github.com/httprb/http/pull/694)
|
30
|
+
Fix cookies extraction.
|
31
|
+
([@flosacca])
|
32
|
+
|
33
|
+
## 5.0.2 (2021-09-10)
|
34
|
+
|
35
|
+
* [#686](https://github.com/httprb/http/pull/686)
|
36
|
+
Correctly reset the parser.
|
37
|
+
([@bryanp])
|
38
|
+
|
39
|
+
* [#684](https://github.com/httprb/http/pull/684)
|
40
|
+
Don't set Content-Length for GET, HEAD, DELETE, or CONNECT requests without a BODY.
|
41
|
+
([@jyn514])
|
42
|
+
|
43
|
+
* [#679](https://github.com/httprb/http/pull/679)
|
44
|
+
Use features on redirected requests.
|
45
|
+
([@nomis])
|
46
|
+
|
47
|
+
* [#678](https://github.com/schwern)
|
48
|
+
Restore `HTTP::Response` `:uri` option for backwards compatibility.
|
49
|
+
([@schwern])
|
50
|
+
|
51
|
+
* [#676](https://github.com/httprb/http/pull/676)
|
52
|
+
Update addressable because of CVE-2021-32740.
|
53
|
+
([@matheussilvasantos])
|
54
|
+
|
55
|
+
* [#653](https://github.com/httprb/http/pull/653)
|
56
|
+
Avoid force encodings on frozen strings.
|
57
|
+
([@bvicenzo])
|
58
|
+
|
59
|
+
* [#638](https://github.com/httprb/http/pull/638)
|
60
|
+
DNS failover handling.
|
61
|
+
([@midnight-wonderer])
|
62
|
+
|
63
|
+
|
64
|
+
## 5.0.1 (2021-06-26)
|
65
|
+
|
66
|
+
* [#670](https://github.com/httprb/http/pull/670)
|
67
|
+
Revert `Response#parse` behavior introduced in [#540].
|
68
|
+
([@DannyBen])
|
69
|
+
|
70
|
+
* [#669](https://github.com/httprb/http/pull/669)
|
71
|
+
Prevent bodies from being resubmitted when following unsafe redirects.
|
72
|
+
([@odinhb])
|
73
|
+
|
74
|
+
* [#664](https://github.com/httprb/http/pull/664)
|
75
|
+
Bump llhttp-ffi to 0.3.0.
|
76
|
+
([@bryanp])
|
77
|
+
|
78
|
+
|
79
|
+
## 5.0.0 (2021-05-12)
|
80
|
+
|
81
|
+
* [#656](https://github.com/httprb/http/pull/656)
|
82
|
+
Handle connection timeouts in `Features`
|
83
|
+
([@semenyukdmitry])
|
84
|
+
|
85
|
+
* [#651](https://github.com/httprb/http/pull/651)
|
86
|
+
Replace `http-parser` with `llhttp`
|
87
|
+
([@bryanp])
|
88
|
+
|
89
|
+
* [#647](https://github.com/httprb/http/pull/647)
|
90
|
+
Add support for `MKCALENDAR` HTTP verb
|
91
|
+
([@meanphil])
|
92
|
+
|
93
|
+
* [#632](https://github.com/httprb/http/pull/632)
|
94
|
+
Respect the SSL context's `verify_hostname` value
|
95
|
+
([@colemannugent])
|
96
|
+
|
97
|
+
* [#625](https://github.com/httprb/http/pull/625)
|
98
|
+
Fix inflator with empty responses
|
99
|
+
([@LukaszMaslej])
|
100
|
+
|
101
|
+
* [#599](https://github.com/httprb/http/pull/599)
|
102
|
+
Allow passing `HTTP::FormData::{Multipart,UrlEncoded}` object directly.
|
103
|
+
([@ixti])
|
104
|
+
|
105
|
+
* [#593](https://github.com/httprb/http/pull/593)
|
106
|
+
[#592](https://github.com/httprb/http/issues/592)
|
107
|
+
Support informational (1XX) responses.
|
108
|
+
([@ixti])
|
109
|
+
|
110
|
+
* [#590](https://github.com/httprb/http/pull/590)
|
111
|
+
[#589](https://github.com/httprb/http/issues/589)
|
112
|
+
Fix response headers paring.
|
113
|
+
([@Bonias])
|
114
|
+
|
115
|
+
* [#587](https://github.com/httprb/http/pull/587)
|
116
|
+
[#585](https://github.com/httprb/http/issues/585)
|
117
|
+
Fix redirections when server responds with multiple Location headers.
|
118
|
+
([@ixti])
|
119
|
+
|
120
|
+
* [#581](https://github.com/httprb/http/pull/581)
|
121
|
+
[#582](https://github.com/httprb/http/issues/582)
|
122
|
+
Add Ruby 2.7.x support.
|
123
|
+
([@janko])
|
124
|
+
|
125
|
+
* [#577](https://github.com/httprb/http/pull/577)
|
126
|
+
Fix `Chainable#timeout` with frozen Hash.
|
127
|
+
([@antonvolkoff])
|
128
|
+
|
129
|
+
* [#576](https://github.com/httprb/http/pull/576)
|
130
|
+
[#524](https://github.com/httprb/http/issues/524)
|
131
|
+
**BREAKING CHANGE**
|
132
|
+
Preserve header names casing.
|
133
|
+
([@joshuaflanagan])
|
134
|
+
|
135
|
+
* [#540](https://github.com/httprb/http/pull/540)
|
136
|
+
[#538](https://github.com/httprb/http/issues/538)
|
137
|
+
**BREAKING CHANGE**
|
138
|
+
Require explicit MIME type for Response#parse
|
139
|
+
([@ixti])
|
140
|
+
|
141
|
+
* [#532](https://github.com/httprb/http/pull/532)
|
142
|
+
Fix pipes support in request bodies.
|
143
|
+
([@ixti])
|
144
|
+
|
145
|
+
* [#530](https://github.com/httprb/http/pull/530)
|
146
|
+
Improve header fields name/value validation.
|
147
|
+
([@Bonias])
|
148
|
+
|
149
|
+
* [#506](https://github.com/httprb/http/pull/506)
|
150
|
+
[#521](https://github.com/httprb/http/issues/521)
|
151
|
+
Skip auto-deflate when there is no body.
|
152
|
+
([@Bonias])
|
153
|
+
|
154
|
+
* [#489](https://github.com/httprb/http/pull/489)
|
155
|
+
Fix HTTP parser.
|
156
|
+
([@ixti], [@fxposter])
|
157
|
+
|
158
|
+
* [#546](https://github.com/httprb/http/pull/546)
|
159
|
+
**BREAKING CHANGE**
|
160
|
+
Provide initiating `HTTP::Request` object on `HTTP::Response`.
|
161
|
+
([@joshuaflanagan])
|
162
|
+
|
163
|
+
* [#571](https://github.com/httprb/http/pull/571)
|
164
|
+
Drop Ruby 2.3.x support.
|
5
165
|
([@ixti])
|
6
166
|
|
167
|
+
* [3ed0c31](https://github.com/httprb/http/commit/3ed0c318eab6a8c390654cda17bf6df9e963c7d6)
|
168
|
+
Drop Ruby 2.4.x support.
|
169
|
+
|
170
|
+
|
7
171
|
## 4.4.0 (2020-03-25)
|
8
172
|
|
9
173
|
* Backport [#587](https://github.com/httprb/http/pull/587)
|
@@ -14,6 +178,7 @@
|
|
14
178
|
Allow passing HTTP::FormData::{Multipart,UrlEncoded} object directly.
|
15
179
|
([@ixti])
|
16
180
|
|
181
|
+
|
17
182
|
## 4.3.0 (2020-01-09)
|
18
183
|
|
19
184
|
* Backport [#581](https://github.com/httprb/http/pull/581)
|
@@ -803,3 +968,23 @@ end
|
|
803
968
|
[@RickCSong]: https://github.com/RickCSong
|
804
969
|
[@fxposter]: https://github.com/fxposter
|
805
970
|
[@mamoonraja]: https://github.com/mamoonraja
|
971
|
+
[@joshuaflanagan]: https://github.com/joshuaflanagan
|
972
|
+
[@antonvolkoff]: https://github.com/antonvolkoff
|
973
|
+
[@LukaszMaslej]: https://github.com/LukaszMaslej
|
974
|
+
[@colemannugent]: https://github.com/colemannugent
|
975
|
+
[@semenyukdmitry]: https://github.com/semenyukdmitry
|
976
|
+
[@bryanp]: https://github.com/bryanp
|
977
|
+
[@meanphil]: https://github.com/meanphil
|
978
|
+
[@odinhb]: https://github.com/odinhb
|
979
|
+
[@DannyBen]: https://github.com/DannyBen
|
980
|
+
[@jyn514]: https://github.com/jyn514
|
981
|
+
[@bvicenzo]: https://github.com/bvicenzo
|
982
|
+
[@nomis]: https://github.com/nomis
|
983
|
+
[@midnight-wonderer]: https://github.com/midnight-wonderer
|
984
|
+
[@schwern]: https://github.com/schwern
|
985
|
+
[@matheussilvasantos]: https://github.com/matheussilvasantos
|
986
|
+
[@PhilCoggins]: https://github.com/PhilCoggins
|
987
|
+
[@flosacca]: https://github.com/flosacca
|
988
|
+
[@YuLeven]: https://github.com/YuLeven
|
989
|
+
[@drwl]: https://github.com/drwl
|
990
|
+
[@tkellogg]: https://github.com/tkellogg
|