Implement a new DataUriLoader that handles the data: URL scheme, enabling inline resources like <img src="data:..."> and CSS url(data:...). The loader parses mediatype headers, supports base64 and percent-encoded data, enforces a 10 MB size limit matching HttpLoader, and handles case-insensitive ;base64 detection and whitespace stripping per WHATWG Fetch §4.1. Percent-decoding is applied before base64 decoding to handle url crate path encoding of /+=. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
328 B
TOML
20 lines
328 B
TOML
[package]
|
|
name = "net"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
base64.workspace = true
|
|
encoding_rs.workspace = true
|
|
percent-encoding.workspace = true
|
|
shared = { path = "../shared" }
|
|
tracing.workspace = true
|
|
ureq.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
tiny_http.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|