protocol-http1 0.32.0 → 0.33.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: 1908561ca0c3707f9e64cbb12c5014c03858f2655dbb4fab1fe18cd31113272c
4
- data.tar.gz: 113d3d3b14b2e4258c4bbcb401ff0fefe07921d85edd231c395d0121f9c8c026
3
+ metadata.gz: d5e39284335ca68719e14bdd3c85f2d9ca6c7fa28939f2625149dc85aa65d2e8
4
+ data.tar.gz: f75598dfa2d6a89c1738c49bbfa76d627cb9badb2220254b4c82b489564f424a
5
5
  SHA512:
6
- metadata.gz: 47d9919aa52376eb982b92a08dc33038e8fd6f201efee3c6b4da0b9f9b4acf2d7dee5bc6ae3023ab28067ec377ac302fc63d679f7113819e907272b5234b8b93
7
- data.tar.gz: 47e13c906b80c14b9bb85abfc367daef71392454c1f7d1b2629afa8b1fbbdf51cf0c80d3e1d65599d25e46cc2cac517c00580b7ae7b8a55a09e5fe9521b0534f
6
+ metadata.gz: 806650cfeeba0aced96ea8ca2d0694c6f5ddce0738b2b3f0493bc6fe70ccbd891981a3aa976cd4644e0622ca9351dd87f80ad997e9ef14794f7b7f2741bd9b98
7
+ data.tar.gz: 2acf1dd39dbbb9f4f5a34a53135c4c828b6f697f4e32fd74fd02ee4494b06818f2253bb9286b1e6862ac2138e2e61f08fe353af5342792e7587ca5a348c01baa
checksums.yaml.gz.sig CHANGED
Binary file
@@ -37,10 +37,9 @@ module Protocol
37
37
 
38
38
  # HTTP/1.x header parser:
39
39
  FIELD_NAME = TOKEN
40
- WS = /[ \t]/ # Whitespace.
41
- OWS = /#{WS}*/ # Optional whitespace.
42
- VCHAR = /[!-~]/ # Match visible characters from ASCII 33 to 126.
43
- FIELD_VALUE = /#{VCHAR}+(?:#{WS}+#{VCHAR}+)*/.freeze
40
+ OWS = /[ \t]*/
41
+ # A field value is any string of characters that does not contain a null character, CR, or LF. After reflecting on the RFCs and surveying real implementations, I came to the conclusion that the RFCs are too restrictive. Most servers only check for the presence of null bytes, and obviously CR/LF characters have semantic meaning in the parser. So, I decided to follow this defacto standard, even if I'm not entirely happy with it.
42
+ FIELD_VALUE = /[^\0\r\n]+/.freeze
44
43
  HEADER = /\A(#{FIELD_NAME}):#{OWS}(?:(#{FIELD_VALUE})#{OWS})?\z/.freeze
45
44
 
46
45
  VALID_FIELD_NAME = /\A#{FIELD_NAME}\z/.freeze
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP1
8
- VERSION = "0.32.0"
8
+ VERSION = "0.33.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.32.0
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file