patron 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/patron/header_parser.rb +1 -1
- data/lib/patron/version.rb +1 -1
- data/spec/header_parser_spec.rb +14 -0
- data/spec/sample_response_headers/sample_http2_header.txt +16 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d150d662006fa9751021e94126b0ef52432fb45
|
4
|
+
data.tar.gz: 240cfef423d0c4aec7c363da618bbd8966d9d8a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75e5e3b6c0c4df36c763ee3a84efdd0771599aae2eed85fb0c8f91596d9304a06e2a209f1b06283b1a461d88dfe6a3eebd34f594e18f7b57bb44d119a256fbed
|
7
|
+
data.tar.gz: d5ae239b30d06e0c143d2fe821bf5110f17aa811b83c69ccabb02e1d2b4a96a954e3eb9fc5509fdd88adc4fc765db0ce53f537e788c6873e769b494005536e94
|
data/CHANGELOG.md
CHANGED
data/lib/patron/header_parser.rb
CHANGED
data/lib/patron/version.rb
CHANGED
data/spec/header_parser_spec.rb
CHANGED
@@ -84,4 +84,18 @@ describe Patron::HeaderParser do
|
|
84
84
|
last_header = first_response.headers[-1]
|
85
85
|
expect(last_header).to eq('Connection: Close')
|
86
86
|
end
|
87
|
+
|
88
|
+
it 'parses headers for an HTTP2 response' do
|
89
|
+
path = File.dirname(__FILE__) + '/sample_response_headers/sample_http2_header.txt'
|
90
|
+
responses = Patron::HeaderParser.parse(File.read(path))
|
91
|
+
|
92
|
+
expect(responses.length).to eq(1)
|
93
|
+
first_response = responses[0]
|
94
|
+
|
95
|
+
expect(first_response.status_line).to eq("HTTP/2 200")
|
96
|
+
expect(first_response.headers).to be_kind_of(Array)
|
97
|
+
expect(first_response.headers).not_to be_empty
|
98
|
+
last_header = first_response.headers[-1]
|
99
|
+
expect(last_header).to eq('strict-transport-security: max-age=15552000; includeSubDomains;')
|
100
|
+
end
|
87
101
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
HTTP/2 200
|
2
|
+
date: Fri, 16 Feb 2018 01:59:32 GMT
|
3
|
+
content-type: text/html; charset=utf-8
|
4
|
+
x-frame-options: SAMEORIGIN
|
5
|
+
x-xss-protection: 1; mode=block
|
6
|
+
x-content-type-options: nosniff
|
7
|
+
cache-control: no-cache, no-store, max-age=0, must-revalidate
|
8
|
+
pragma: no-cache
|
9
|
+
expires: Fri, 01 Jan 1990 00:00:00 GMT
|
10
|
+
vary: Accept-Encoding, Origin
|
11
|
+
set-cookie: _wt_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTAyMTlhNTA4ZDNlYzVlMWJlMDFjZDdiOWUwMDBmMjAzBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMWxHRlFjRjNGRXRaS2pVR1RrNXVvNHkwZ3didUV4L1htTXExRUppYytNV1k9BjsARg%3D%3D--15724585750f7e220903e84f5978758cb8c67aea; domain=wetransfer.com; path=/; secure; HttpOnly
|
12
|
+
x-request-id: 668bd810-42ae-4e02-8c58-3f9d7b052365
|
13
|
+
x-opaque: 6d43d0f0705486926447448fc17c8ded512fdeaf-1.wt-17271
|
14
|
+
x-runtime: 0.159185
|
15
|
+
strict-transport-security: max-age=15552000; includeSubDomains;
|
16
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phillip Toland
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- spec/sample_response_headers/headers_wetransfer_with_proxy_status.txt
|
171
171
|
- spec/sample_response_headers/headers_wetransfer_with_redirect.txt
|
172
172
|
- spec/sample_response_headers/headers_with_set_cookie.txt
|
173
|
+
- spec/sample_response_headers/sample_http2_header.txt
|
173
174
|
- spec/sample_response_headers/webmock_headers_without_trailing_crlf.txt
|
174
175
|
- spec/session_spec.rb
|
175
176
|
- spec/session_ssl_spec.rb
|
@@ -203,9 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
204
|
version: 1.2.0
|
204
205
|
requirements: []
|
205
206
|
rubyforge_project: patron
|
206
|
-
rubygems_version: 2.
|
207
|
+
rubygems_version: 2.6.11
|
207
208
|
signing_key:
|
208
209
|
specification_version: 4
|
209
210
|
summary: Patron HTTP Client
|
210
211
|
test_files: []
|
211
|
-
has_rdoc:
|