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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http1/connection.rb +3 -4
- data/lib/protocol/http1/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5e39284335ca68719e14bdd3c85f2d9ca6c7fa28939f2625149dc85aa65d2e8
|
4
|
+
data.tar.gz: f75598dfa2d6a89c1738c49bbfa76d627cb9badb2220254b4c82b489564f424a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
41
|
-
|
42
|
-
|
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
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|