http 4.2.0 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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 +192 -0
- data/.yardopts +1 -1
- data/CHANGES.md +168 -0
- data/Gemfile +18 -10
- data/LICENSE.txt +1 -1
- data/README.md +17 -20
- data/Rakefile +2 -10
- data/http.gemspec +5 -5
- data/lib/http/chainable.rb +23 -17
- data/lib/http/client.rb +52 -35
- data/lib/http/connection.rb +12 -8
- data/lib/http/content_type.rb +12 -7
- data/lib/http/feature.rb +3 -1
- data/lib/http/features/auto_deflate.rb +7 -7
- 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 +6 -9
- data/lib/http/redirector.rb +4 -2
- data/lib/http/request/body.rb +1 -0
- data/lib/http/request/writer.rb +8 -3
- 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 +75 -49
- data/lib/http/response/status.rb +4 -3
- data/lib/http/response.rb +35 -15
- data/lib/http/timeout/global.rb +42 -38
- data/lib/http/timeout/null.rb +2 -1
- data/lib/http/timeout/per_operation.rb +56 -58
- data/lib/http/uri.rb +5 -5
- data/lib/http/version.rb +1 -1
- data/spec/lib/http/client_spec.rb +173 -35
- 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 +59 -1
- 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 +74 -0
- data/spec/lib/http/response/status_spec.rb +3 -3
- data/spec/lib/http/response_spec.rb +44 -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 +4 -4
- data/spec/support/simplecov.rb +19 -0
- data/spec/support/ssl_helper.rb +4 -4
- metadata +24 -16
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe455ddc7caea6475216135d2748825078dfe40aa5d474e219e054a330d54967
|
4
|
+
data.tar.gz: cdc04d4ccd9e7a8d45ad5db093c63bd2172720aa0c22f6e095fe93c6892e4ea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eff3f4e56087fd798ecc435ddc662b9e3b8e248c4a39448323643238cc7f8855a98ecfbe392e26f9e77b9129f18fcab13c1a3c588c819453a2f5199a24683c28
|
7
|
+
data.tar.gz: fe8fbd07014f69631414e2644aa48198e34cac0d085a4bce8f056a5284088a2414557a5bb83456f953ce2fdaa6b69621746a31430446664f56eca2a2b454117c
|
@@ -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.5, ruby-2.6, ruby-2.7, ruby-3.0 ]
|
20
|
+
os: [ ubuntu-latest ]
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
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@v2
|
56
|
+
|
57
|
+
- uses: ruby/setup-ruby@v1
|
58
|
+
with:
|
59
|
+
ruby-version: 2.5
|
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.5
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 42`
|
3
|
+
# on 2021-04-10 09:49:03 UTC using RuboCop version 1.12.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: 53
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: EnforcedStyle.
|
12
|
+
# SupportedStyles: leading, trailing
|
13
|
+
Layout/DotPosition:
|
14
|
+
Exclude:
|
15
|
+
- 'lib/http/options.rb'
|
16
|
+
- 'spec/lib/http/client_spec.rb'
|
17
|
+
- 'spec/lib/http/features/auto_deflate_spec.rb'
|
18
|
+
- 'spec/lib/http/headers_spec.rb'
|
19
|
+
- 'spec/lib/http/options/features_spec.rb'
|
20
|
+
- 'spec/lib/http/redirector_spec.rb'
|
21
|
+
- 'spec/lib/http/response/body_spec.rb'
|
22
|
+
- 'spec/lib/http_spec.rb'
|
23
|
+
- 'spec/support/http_handling_shared.rb'
|
24
|
+
|
25
|
+
# Offense count: 174
|
26
|
+
# Cop supports --auto-correct.
|
27
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
28
|
+
# SupportedStyles: space, no_space, compact
|
29
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
30
|
+
Layout/SpaceInsideHashLiteralBraces:
|
31
|
+
Exclude:
|
32
|
+
- 'lib/http/chainable.rb'
|
33
|
+
- 'spec/lib/http/client_spec.rb'
|
34
|
+
- 'spec/lib/http/features/auto_inflate_spec.rb'
|
35
|
+
- 'spec/lib/http/features/instrumentation_spec.rb'
|
36
|
+
- 'spec/lib/http/features/logging_spec.rb'
|
37
|
+
- 'spec/lib/http/headers_spec.rb'
|
38
|
+
- 'spec/lib/http/options/features_spec.rb'
|
39
|
+
- 'spec/lib/http/options/merge_spec.rb'
|
40
|
+
- 'spec/lib/http/options/new_spec.rb'
|
41
|
+
- 'spec/lib/http/redirector_spec.rb'
|
42
|
+
- 'spec/lib/http/request_spec.rb'
|
43
|
+
- 'spec/lib/http/response_spec.rb'
|
44
|
+
- 'spec/lib/http_spec.rb'
|
45
|
+
- 'spec/support/dummy_server/servlet.rb'
|
46
|
+
- 'spec/support/http_handling_shared.rb'
|
47
|
+
- 'spec/support/ssl_helper.rb'
|
48
|
+
|
49
|
+
# Offense count: 4
|
50
|
+
Lint/MissingSuper:
|
51
|
+
Exclude:
|
52
|
+
- 'lib/http/features/auto_deflate.rb'
|
53
|
+
- 'lib/http/features/instrumentation.rb'
|
54
|
+
- 'lib/http/features/logging.rb'
|
55
|
+
- 'lib/http/features/normalize_uri.rb'
|
56
|
+
|
57
|
+
# Offense count: 8
|
58
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes, Max.
|
59
|
+
Metrics/AbcSize:
|
60
|
+
Exclude:
|
61
|
+
- 'lib/http/chainable.rb'
|
62
|
+
- 'lib/http/client.rb'
|
63
|
+
- 'lib/http/connection.rb'
|
64
|
+
- 'lib/http/features/auto_deflate.rb'
|
65
|
+
- 'lib/http/redirector.rb'
|
66
|
+
- 'lib/http/request.rb'
|
67
|
+
- 'lib/http/response.rb'
|
68
|
+
|
69
|
+
# Offense count: 66
|
70
|
+
# Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
|
71
|
+
# IgnoredMethods: refine
|
72
|
+
Metrics/BlockLength:
|
73
|
+
Exclude:
|
74
|
+
- '**/*.gemspec'
|
75
|
+
- 'spec/lib/http/client_spec.rb'
|
76
|
+
- 'spec/lib/http/connection_spec.rb'
|
77
|
+
- 'spec/lib/http/content_type_spec.rb'
|
78
|
+
- 'spec/lib/http/features/auto_deflate_spec.rb'
|
79
|
+
- 'spec/lib/http/features/auto_inflate_spec.rb'
|
80
|
+
- 'spec/lib/http/features/instrumentation_spec.rb'
|
81
|
+
- 'spec/lib/http/features/logging_spec.rb'
|
82
|
+
- 'spec/lib/http/headers/mixin_spec.rb'
|
83
|
+
- 'spec/lib/http/headers_spec.rb'
|
84
|
+
- 'spec/lib/http/options/merge_spec.rb'
|
85
|
+
- 'spec/lib/http/redirector_spec.rb'
|
86
|
+
- 'spec/lib/http/request/body_spec.rb'
|
87
|
+
- 'spec/lib/http/request/writer_spec.rb'
|
88
|
+
- 'spec/lib/http/request_spec.rb'
|
89
|
+
- 'spec/lib/http/response/body_spec.rb'
|
90
|
+
- 'spec/lib/http/response/parser_spec.rb'
|
91
|
+
- 'spec/lib/http/response/status_spec.rb'
|
92
|
+
- 'spec/lib/http/response_spec.rb'
|
93
|
+
- 'spec/lib/http_spec.rb'
|
94
|
+
- 'spec/support/http_handling_shared.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/timeout/global.rb'
|
128
|
+
|
129
|
+
# Offense count: 1
|
130
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
131
|
+
Metrics/ModuleLength:
|
132
|
+
Exclude:
|
133
|
+
- 'lib/http/chainable.rb'
|
134
|
+
|
135
|
+
# Offense count: 2
|
136
|
+
# Cop supports --auto-correct.
|
137
|
+
# Configuration parameters: EnforcedStyle.
|
138
|
+
# SupportedStyles: separated, grouped
|
139
|
+
Style/AccessorGrouping:
|
140
|
+
Exclude:
|
141
|
+
- 'lib/http/request.rb'
|
142
|
+
|
143
|
+
# Offense count: 4
|
144
|
+
# Cop supports --auto-correct.
|
145
|
+
Style/EmptyCaseCondition:
|
146
|
+
Exclude:
|
147
|
+
- 'lib/http/client.rb'
|
148
|
+
- 'lib/http/headers.rb'
|
149
|
+
- 'lib/http/options.rb'
|
150
|
+
- 'lib/http/response/status.rb'
|
151
|
+
|
152
|
+
# Offense count: 5
|
153
|
+
# Cop supports --auto-correct.
|
154
|
+
Style/Encoding:
|
155
|
+
Exclude:
|
156
|
+
- 'spec/lib/http/client_spec.rb'
|
157
|
+
- 'spec/lib/http/request/writer_spec.rb'
|
158
|
+
- 'spec/lib/http/request_spec.rb'
|
159
|
+
- 'spec/lib/http_spec.rb'
|
160
|
+
- 'spec/support/dummy_server/servlet.rb'
|
161
|
+
|
162
|
+
# Offense count: 17
|
163
|
+
# Configuration parameters: SuspiciousParamNames.
|
164
|
+
# SuspiciousParamNames: options, opts, args, params, parameters
|
165
|
+
Style/OptionHash:
|
166
|
+
Exclude:
|
167
|
+
- 'lib/http/chainable.rb'
|
168
|
+
- 'lib/http/client.rb'
|
169
|
+
- 'lib/http/feature.rb'
|
170
|
+
- 'lib/http/options.rb'
|
171
|
+
- 'lib/http/redirector.rb'
|
172
|
+
- 'lib/http/timeout/null.rb'
|
173
|
+
- 'spec/support/dummy_server.rb'
|
174
|
+
|
175
|
+
# Offense count: 4
|
176
|
+
# Configuration parameters: AllowedMethods.
|
177
|
+
# AllowedMethods: respond_to_missing?
|
178
|
+
Style/OptionalBooleanParameter:
|
179
|
+
Exclude:
|
180
|
+
- 'lib/http/timeout/global.rb'
|
181
|
+
- 'lib/http/timeout/null.rb'
|
182
|
+
- 'lib/http/timeout/per_operation.rb'
|
183
|
+
- 'lib/http/uri.rb'
|
184
|
+
|
185
|
+
# Offense count: 3
|
186
|
+
# Cop supports --auto-correct.
|
187
|
+
# Configuration parameters: AutoCorrect, Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
188
|
+
# URISchemes: http, https
|
189
|
+
Layout/LineLength:
|
190
|
+
Exclude:
|
191
|
+
- 'lib/http/chainable.rb'
|
192
|
+
- '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,3 +1,156 @@
|
|
1
|
+
## 5.0.2 (2021-09-10)
|
2
|
+
|
3
|
+
* [#686](https://github.com/httprb/http/pull/686)
|
4
|
+
Correctly reset the parser.
|
5
|
+
([@bryanp])
|
6
|
+
|
7
|
+
* [#684](https://github.com/httprb/http/pull/684)
|
8
|
+
Don't set Content-Length for GET, HEAD, DELETE, or CONNECT requests without a BODY.
|
9
|
+
([@jyn514])
|
10
|
+
|
11
|
+
* [#679](https://github.com/httprb/http/pull/679)
|
12
|
+
Use features on redirected requests.
|
13
|
+
([@nomis])
|
14
|
+
|
15
|
+
* [#678](https://github.com/schwern)
|
16
|
+
Restore `HTTP::Response` `:uri` option for backwards compatibility.
|
17
|
+
([@schwern])
|
18
|
+
|
19
|
+
* [#676](https://github.com/httprb/http/pull/676)
|
20
|
+
Update addressable because of CVE-2021-32740.
|
21
|
+
([@matheussilvasantos])
|
22
|
+
|
23
|
+
* [#653](https://github.com/httprb/http/pull/653)
|
24
|
+
Avoid force encodings on frozen strings.
|
25
|
+
([@bvicenzo])
|
26
|
+
|
27
|
+
* [#638](https://github.com/httprb/http/pull/638)
|
28
|
+
DNS failover handling.
|
29
|
+
([@midnight-wonderer])
|
30
|
+
|
31
|
+
## 5.0.1 (2021-06-26)
|
32
|
+
|
33
|
+
* [#670](https://github.com/httprb/http/pull/670)
|
34
|
+
Revert `Response#parse` behavior introduced in [#540].
|
35
|
+
([@DannyBen])
|
36
|
+
|
37
|
+
* [#669](https://github.com/httprb/http/pull/669)
|
38
|
+
Prevent bodies from being resubmitted when following unsafe redirects.
|
39
|
+
([@odinhb])
|
40
|
+
|
41
|
+
* [#664](https://github.com/httprb/http/pull/664)
|
42
|
+
Bump llhttp-ffi to 0.3.0.
|
43
|
+
([@bryanp])
|
44
|
+
|
45
|
+
## 5.0.0 (2021-05-12)
|
46
|
+
|
47
|
+
* [#656](https://github.com/httprb/http/pull/656)
|
48
|
+
Handle connection timeouts in `Features`
|
49
|
+
([@semenyukdmitry])
|
50
|
+
|
51
|
+
* [#651](https://github.com/httprb/http/pull/651)
|
52
|
+
Replace `http-parser` with `llhttp`
|
53
|
+
([@bryanp])
|
54
|
+
|
55
|
+
* [#647](https://github.com/httprb/http/pull/647)
|
56
|
+
Add support for `MKCALENDAR` HTTP verb
|
57
|
+
([@meanphil])
|
58
|
+
|
59
|
+
* [#632](https://github.com/httprb/http/pull/632)
|
60
|
+
Respect the SSL context's `verify_hostname` value
|
61
|
+
([@colemannugent])
|
62
|
+
|
63
|
+
* [#625](https://github.com/httprb/http/pull/625)
|
64
|
+
Fix inflator with empty responses
|
65
|
+
([@LukaszMaslej])
|
66
|
+
|
67
|
+
* [#599](https://github.com/httprb/http/pull/599)
|
68
|
+
Allow passing `HTTP::FormData::{Multipart,UrlEncoded}` object directly.
|
69
|
+
([@ixti])
|
70
|
+
|
71
|
+
* [#593](https://github.com/httprb/http/pull/593)
|
72
|
+
[#592](https://github.com/httprb/http/issues/592)
|
73
|
+
Support informational (1XX) responses.
|
74
|
+
([@ixti])
|
75
|
+
|
76
|
+
* [#590](https://github.com/httprb/http/pull/590)
|
77
|
+
[#589](https://github.com/httprb/http/issues/589)
|
78
|
+
Fix response headers paring.
|
79
|
+
([@Bonias])
|
80
|
+
|
81
|
+
* [#587](https://github.com/httprb/http/pull/587)
|
82
|
+
[#585](https://github.com/httprb/http/issues/585)
|
83
|
+
Fix redirections when server responds with multiple Location headers.
|
84
|
+
([@ixti])
|
85
|
+
|
86
|
+
* [#581](https://github.com/httprb/http/pull/581)
|
87
|
+
[#582](https://github.com/httprb/http/issues/582)
|
88
|
+
Add Ruby 2.7.x support.
|
89
|
+
([@janko])
|
90
|
+
|
91
|
+
* [#577](https://github.com/httprb/http/pull/577)
|
92
|
+
Fix `Chainable#timeout` with frozen Hash.
|
93
|
+
([@antonvolkoff])
|
94
|
+
|
95
|
+
* [#576](https://github.com/httprb/http/pull/576)
|
96
|
+
[#524](https://github.com/httprb/http/issues/524)
|
97
|
+
Preserve header names casing.
|
98
|
+
([@joshuaflanagan])
|
99
|
+
|
100
|
+
* [#540](https://github.com/httprb/http/pull/540)
|
101
|
+
[#538](https://github.com/httprb/http/issues/538)
|
102
|
+
**BREAKING CHANGE**
|
103
|
+
Require explicit MIME type for Response#parse
|
104
|
+
([@ixti])
|
105
|
+
|
106
|
+
* [#532](https://github.com/httprb/http/pull/532)
|
107
|
+
Fix pipes support in request bodies.
|
108
|
+
([@ixti])
|
109
|
+
|
110
|
+
* [#530](https://github.com/httprb/http/pull/530)
|
111
|
+
Improve header fields name/value validation.
|
112
|
+
([@Bonias])
|
113
|
+
|
114
|
+
* [#506](https://github.com/httprb/http/pull/506)
|
115
|
+
[#521](https://github.com/httprb/http/issues/521)
|
116
|
+
Skip auto-deflate when there is no body.
|
117
|
+
([@Bonias])
|
118
|
+
|
119
|
+
* [#489](https://github.com/httprb/http/pull/489)
|
120
|
+
Fix HTTP parser.
|
121
|
+
([@ixti], [@fxposter])
|
122
|
+
|
123
|
+
* [#546](https://github.com/httprb/http/pull/546)
|
124
|
+
**BREAKING CHANGE**
|
125
|
+
Provide initiating `HTTP::Request` object on `HTTP::Response`.
|
126
|
+
([@joshuaflanagan])
|
127
|
+
|
128
|
+
* [#571](https://github.com/httprb/http/pull/571)
|
129
|
+
Drop Ruby 2.3.x support.
|
130
|
+
([@ixti])
|
131
|
+
|
132
|
+
* [3ed0c31](https://github.com/httprb/http/commit/3ed0c318eab6a8c390654cda17bf6df9e963c7d6)
|
133
|
+
Drop Ruby 2.4.x support.
|
134
|
+
|
135
|
+
|
136
|
+
## 4.4.0 (2020-03-25)
|
137
|
+
|
138
|
+
* Backport [#587](https://github.com/httprb/http/pull/587)
|
139
|
+
Fix redirections when server responds with multiple Location headers.
|
140
|
+
([@ixti])
|
141
|
+
|
142
|
+
* Backport [#599](https://github.com/httprb/http/pull/599)
|
143
|
+
Allow passing HTTP::FormData::{Multipart,UrlEncoded} object directly.
|
144
|
+
([@ixti])
|
145
|
+
|
146
|
+
|
147
|
+
## 4.3.0 (2020-01-09)
|
148
|
+
|
149
|
+
* Backport [#581](https://github.com/httprb/http/pull/581)
|
150
|
+
Add Ruby-2.7 compatibility.
|
151
|
+
([@ixti], [@janko])
|
152
|
+
|
153
|
+
|
1
154
|
## 4.2.0 (2019-10-22)
|
2
155
|
|
3
156
|
* Backport [#489](https://github.com/httprb/http/pull/489)
|
@@ -780,3 +933,18 @@ end
|
|
780
933
|
[@RickCSong]: https://github.com/RickCSong
|
781
934
|
[@fxposter]: https://github.com/fxposter
|
782
935
|
[@mamoonraja]: https://github.com/mamoonraja
|
936
|
+
[@joshuaflanagan]: https://github.com/joshuaflanagan
|
937
|
+
[@antonvolkoff]: https://github.com/antonvolkoff
|
938
|
+
[@LukaszMaslej]: https://github.com/LukaszMaslej
|
939
|
+
[@colemannugent]: https://github.com/colemannugent
|
940
|
+
[@semenyukdmitry]: https://github.com/semenyukdmitry
|
941
|
+
[@bryanp]: https://github.com/bryanp
|
942
|
+
[@meanphil]: https://github.com/meanphil
|
943
|
+
[@odinhb]: https://github.com/odinhb
|
944
|
+
[@DannyBen]: https://github.com/DannyBen
|
945
|
+
[@jyn514]: https://github.com/jyn514
|
946
|
+
[@bvicenzo]: https://github.com/bvicenzo
|
947
|
+
[@nomis]: https://github.com/nomis
|
948
|
+
[@midnight-wonderer]: https://github.com/midnight-wonderer
|
949
|
+
[@schwern]: https://github.com/schwern
|
950
|
+
[@matheussilvasantos]: https://github.com/matheussilvasantos
|
data/Gemfile
CHANGED
@@ -5,30 +5,38 @@ ruby RUBY_VERSION
|
|
5
5
|
|
6
6
|
gem "rake"
|
7
7
|
|
8
|
+
# Ruby 3.0 does not ship it anymore.
|
9
|
+
# TODO: We should probably refactor specs to avoid need for it.
|
10
|
+
gem "webrick"
|
11
|
+
|
8
12
|
group :development do
|
9
13
|
gem "guard-rspec", :require => false
|
10
14
|
gem "nokogiri", :require => false
|
11
15
|
gem "pry", :require => false
|
12
16
|
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
# RSpec formatter
|
18
|
+
gem "fuubar", :require => false
|
19
|
+
|
20
|
+
platform :mri do
|
21
|
+
gem "pry-byebug"
|
16
22
|
end
|
17
23
|
end
|
18
24
|
|
19
25
|
group :test do
|
20
|
-
gem "
|
21
|
-
gem "certificate_authority", :require => false
|
26
|
+
gem "certificate_authority", "~> 1.0", :require => false
|
22
27
|
|
23
28
|
gem "backports"
|
24
29
|
|
25
|
-
gem "
|
26
|
-
gem "
|
30
|
+
gem "rubocop"
|
31
|
+
gem "rubocop-performance"
|
32
|
+
gem "rubocop-rake"
|
33
|
+
gem "rubocop-rspec"
|
27
34
|
|
28
|
-
gem "
|
29
|
-
gem "
|
35
|
+
gem "simplecov", :require => false
|
36
|
+
gem "simplecov-lcov", :require => false
|
30
37
|
|
31
|
-
gem "
|
38
|
+
gem "rspec", "~> 3.10"
|
39
|
+
gem "rspec-its"
|
32
40
|
|
33
41
|
gem "yardstick"
|
34
42
|
end
|