mpp-rb 0.1.0 → 0.1.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/lib/mpp/parsing.rb +2 -2
- data/lib/mpp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 033c7cfeecb0955e5241cac709e73c0ebd7c4fc7761881614c5ce11128b342f7
|
|
4
|
+
data.tar.gz: d5611e4ed86e15ad49f04ca482a44b07b89e4c107cec0adc0e2a647a8fcfd04a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b88426e6a71a1c46a089f2eeabf502a8ba58267dafaf7a800a8781befcb043313112f3813d8def6aa03fccfe264f03d019e9da8f6c9a2e03262a55f2ae8e500
|
|
7
|
+
data.tar.gz: 15690c57ad85fe973be97c9c0fd0e199c865dd65793ffe86507ee118a32589e42055cf61e4bc04e9aad86e84587d882bf7e9ce5a59d8e6fe293fd3ab839d6732
|
data/lib/mpp/parsing.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Mpp
|
|
|
12
12
|
MAX_HEADER_PAYLOAD_SIZE = T.let(16 * 1024, Integer)
|
|
13
13
|
|
|
14
14
|
# RFC 9110 auth-param regex: key="value" or key=token
|
|
15
|
-
AUTH_PARAM_RE = /([a-zA-Z_][\w-]
|
|
15
|
+
AUTH_PARAM_RE = /([a-zA-Z_][\w-]*+)\s*=\s*(?:"((?:[^"\\]|\\.)*)"|([^\s,]++))/
|
|
16
16
|
|
|
17
17
|
module_function
|
|
18
18
|
|
|
@@ -43,7 +43,7 @@ module Mpp
|
|
|
43
43
|
def escape_quoted(str)
|
|
44
44
|
Kernel.raise Mpp::ParseError, "Header value contains invalid CRLF characters" if str.include?("\r") || str.include?("\n")
|
|
45
45
|
|
|
46
|
-
str.gsub(
|
|
46
|
+
str.gsub(/[\\"]/) { |c| "\\#{c}" }
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
# Unescape a quoted-string value.
|
data/lib/mpp/version.rb
CHANGED