protocol-http1 0.15.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 628996f62e649fce9998463a3147bba9690074ccd422d8973b56840f169ddbef
4
- data.tar.gz: 368fd3265a87abe2f0300741f568194d5f479121fd49ccf51e0fdce6725dd080
3
+ metadata.gz: bd649e1cfc933db22108e92849ddbe40f516b5f37c5c9b01db704764c445554c
4
+ data.tar.gz: 3c38f467000c80e62831ca4d4ecf19e787ea7176871461d228e6d7817198580a
5
5
  SHA512:
6
- metadata.gz: c3b589a20fb9395b6245ace8b113b7c57f541e9077562cece7673e8ba3577c0825bc71ed229902447e7abc735e126e6d2cd7a2b4a5b9385e24b5e5fb7c3596da
7
- data.tar.gz: 15ff254cb06790546e76b00de892c10e712eb42ca30629b9c527d90034c252993c9de71be6d6b9f3f0cb26745ab554cf71e75e63e18a8b847c510d2bad16d45c
6
+ metadata.gz: 2db727958d638bb129d1062fa22ca1149994c41c5a3b23ca2b50409e0d761e2494f959aa21d407bd2cf9019754707d13a46a7e4c33a2001fac1dcee8f65cd211
7
+ data.tar.gz: e4c2a03cf2c9d2e021a81c5e63a9366875e521d8c6847e101fc64d9955f5fe84da79e05aaa54e6c1aa388c46edb791367573240e50743d5a0e54565028c8e3c0
checksums.yaml.gz.sig CHANGED
Binary file
@@ -41,7 +41,7 @@ module Protocol
41
41
  def read
42
42
  return nil if @finished
43
43
 
44
- length, extensions = read_line.split(";", 2)
44
+ length, _extensions = read_line.split(";", 2)
45
45
 
46
46
  unless length =~ VALID_CHUNK_LENGTH
47
47
  raise BadRequest, "Invalid chunk length: #{length.dump}"
@@ -128,6 +128,15 @@ module Protocol
128
128
  write_headers(headers)
129
129
  end
130
130
 
131
+ def write_interim_response(version, status, headers, reason = Reason::DESCRIPTIONS[status])
132
+ @stream.write("#{version} #{status} #{reason}\r\n")
133
+
134
+ write_headers(headers)
135
+
136
+ @stream.write("\r\n")
137
+ @stream.flush
138
+ end
139
+
131
140
  def write_headers(headers)
132
141
  headers.each do |name, value|
133
142
  # Convert it to a string:
@@ -405,7 +414,7 @@ module Protocol
405
414
  if content_length =~ VALID_CONTENT_LENGTH
406
415
  yield Integer(content_length, 10)
407
416
  else
408
- raise BadRequest, "Invalid content length: #{content_length}"
417
+ raise BadRequest, "Invalid content length: #{content_length.dump}"
409
418
  end
410
419
  end
411
420
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP1
8
- VERSION = "0.15.1"
8
+ VERSION = "0.16.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.15.1
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -40,7 +40,7 @@ cert_chain:
40
40
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
41
41
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
42
42
  -----END CERTIFICATE-----
43
- date: 2023-07-30 00:00:00.000000000 Z
43
+ date: 2023-10-24 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: protocol-http
metadata.gz.sig CHANGED
Binary file