protocol-http1 0.30.0 → 0.31.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8e19e671a7c4596842f4bcc2a8b82e395a24ed3754c8205625747223fd574f5
4
- data.tar.gz: 5a911681a3193eebc65d5a329045d413e2508ef2b20f28a4abe52bf6b09aad57
3
+ metadata.gz: 29db57e08ceb65831410a015b07b643fe3223c119327f001485c4d942195516e
4
+ data.tar.gz: 01b83de5925e1d89d4ffb729f22bab647e4fa5ac04d239a2ff81899bacb395f9
5
5
  SHA512:
6
- metadata.gz: a40371b329727872dd04be0a0902e771c7a3231a4262380c84c4abfa96065a73d4088b0f3fc2c0b25b8f1882cd03ba6e888d786018934b1a5230a4c3676fbb54
7
- data.tar.gz: 7fa713254161dad9802b8783c45f290f30993f1957ce64d4d2dd3718e699d8195a6e56dc9991aeba06c2c773be83e672b7f522e093ee3de30187ec8a1b0198bb
6
+ metadata.gz: 564dcdb26845995de2c5f05b0b8e6c464615a6cc7345685c30e5d28bca09ccd03f3b58075da67e7afb3aab5ecb8213db76fb3fad1e59643899f68e0415ca915b
7
+ data.tar.gz: a10dbcdcf55d5687eb3e94476869b2ce4af1502a056e5f70b4dfb1c751ba2bf2bad46e11cd8d8ae666314390eec95daef1c39a5ad93debab744718fadd568535
checksums.yaml.gz.sig CHANGED
Binary file
@@ -148,7 +148,7 @@ module Protocol
148
148
  else
149
149
  return false
150
150
  end
151
- else
151
+ else # HTTP/1.1+
152
152
  if connection = headers[CONNECTION]
153
153
  return !connection.close?
154
154
  else
@@ -320,7 +320,11 @@ module Protocol
320
320
 
321
321
  headers = read_headers
322
322
 
323
- @persistent = persistent?(version, method, headers)
323
+ # If we are not persistent, we can't become persistent even if the request might allow it:
324
+ if @persistent
325
+ # In other words, `@persistent` can only transition from true to false.
326
+ @persistent = persistent?(version, method, headers)
327
+ end
324
328
 
325
329
  body = read_request_body(method, headers)
326
330
 
@@ -358,7 +362,9 @@ module Protocol
358
362
 
359
363
  headers = read_headers
360
364
 
361
- @persistent = persistent?(version, method, headers)
365
+ if @persistent
366
+ @persistent = persistent?(version, method, headers)
367
+ end
362
368
 
363
369
  unless interim_status?(status)
364
370
  body = read_response_body(method, status, headers)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP1
8
- VERSION = "0.30.0"
8
+ VERSION = "0.31.0"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -41,7 +41,7 @@ cert_chain:
41
41
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
42
42
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
43
43
  -----END CERTIFICATE-----
44
- date: 2025-01-29 00:00:00.000000000 Z
44
+ date: 2025-03-13 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: protocol-http
metadata.gz.sig CHANGED
Binary file