protocol-url 0.8.0 → 0.10.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/url/error.rb +12 -0
- data/lib/protocol/url/form_data/nested.rb +2 -1
- data/lib/protocol/url/form_data/parser.rb +3 -2
- data/lib/protocol/url/version.rb +1 -1
- data/lib/protocol/url.rb +1 -0
- data/readme.md +8 -0
- data/releases.md +8 -0
- data.tar.gz.sig +0 -0
- metadata +2 -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: 7aeaada96a9b666006635d0589aefee1a0bbd4b0df7787a40a6c5d40faeb87f1
|
|
4
|
+
data.tar.gz: 3bb9157f29504fd386b9da7730ad0e346371488a2cd440525ab501a5127d62e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82707be363eedcc58a739f62acdca6b5b611f8a5e7e36992a2db6b48fdc2c950d7f0b72ebb38bd05cecee8fbeb42453cdb49a6be2a921053169a0bf633a998a7
|
|
7
|
+
data.tar.gz: 808c99891a07593694ce6ab7542986ef7c95d53d4882c4efef79aec34fb35812824e4c69b7ce11e9fe44fa971f0ee8765408f2997db7e4f9fca25d497f314ece
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# Copyright, 2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
require_relative "../encoding"
|
|
7
|
+
require_relative "../error"
|
|
7
8
|
|
|
8
9
|
module Protocol
|
|
9
10
|
module URL
|
|
@@ -32,7 +33,7 @@ module Protocol
|
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
if @depth_limit and keys.size > @depth_limit
|
|
35
|
-
raise
|
|
36
|
+
raise LimitError, "Form data depth exceeded limit of #{@depth_limit}!"
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
Encoding.assign(keys, value, @root)
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# Copyright, 2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
require_relative "nested"
|
|
7
|
+
require_relative "../error"
|
|
7
8
|
|
|
8
9
|
module Protocol
|
|
9
10
|
module URL
|
|
@@ -11,7 +12,7 @@ module Protocol
|
|
|
11
12
|
module FormData
|
|
12
13
|
# Incrementally parses `application/x-www-form-urlencoded` form data.
|
|
13
14
|
class Parser
|
|
14
|
-
|
|
15
|
+
MEDIA_TYPE = "application/x-www-form-urlencoded"
|
|
15
16
|
|
|
16
17
|
# The encoded body size limit.
|
|
17
18
|
SIZE_LIMIT = 2 * 1024 * 1024
|
|
@@ -107,7 +108,7 @@ module Protocol
|
|
|
107
108
|
|
|
108
109
|
def check_limit(name, value, limit)
|
|
109
110
|
if limit and value > limit
|
|
110
|
-
raise
|
|
111
|
+
raise LimitError, "Form data #{name} exceeded limit of #{limit}!"
|
|
111
112
|
end
|
|
112
113
|
end
|
|
113
114
|
end
|
data/lib/protocol/url/version.rb
CHANGED
data/lib/protocol/url.rb
CHANGED
data/readme.md
CHANGED
|
@@ -34,6 +34,14 @@ This project is best served by a collaborative and respectful environment. Treat
|
|
|
34
34
|
|
|
35
35
|
Please see the [project releases](https://socketry.github.io/protocol-url/releases/index) for all releases.
|
|
36
36
|
|
|
37
|
+
### v0.10.0
|
|
38
|
+
|
|
39
|
+
- Rename `Protocol::URL::FormData::Parser::CONTENT_TYPE` to `MEDIA_TYPE`.
|
|
40
|
+
|
|
41
|
+
### v0.9.0
|
|
42
|
+
|
|
43
|
+
- Add `Protocol::URL::LimitError` for configured processing limits.
|
|
44
|
+
|
|
37
45
|
### v0.8.0
|
|
38
46
|
|
|
39
47
|
- Use consistent limit naming for form data parser constraints.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.10.0
|
|
4
|
+
|
|
5
|
+
- Rename `Protocol::URL::FormData::Parser::CONTENT_TYPE` to `MEDIA_TYPE`.
|
|
6
|
+
|
|
7
|
+
## v0.9.0
|
|
8
|
+
|
|
9
|
+
- Add `Protocol::URL::LimitError` for configured processing limits.
|
|
10
|
+
|
|
3
11
|
## v0.8.0
|
|
4
12
|
|
|
5
13
|
- Use consistent limit naming for form data parser constraints.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: protocol-url
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -45,6 +45,7 @@ files:
|
|
|
45
45
|
- lib/protocol/url.rb
|
|
46
46
|
- lib/protocol/url/absolute.rb
|
|
47
47
|
- lib/protocol/url/encoding.rb
|
|
48
|
+
- lib/protocol/url/error.rb
|
|
48
49
|
- lib/protocol/url/form_data/nested.rb
|
|
49
50
|
- lib/protocol/url/form_data/parser.rb
|
|
50
51
|
- lib/protocol/url/path.rb
|
metadata.gz.sig
CHANGED
|
Binary file
|