Say the source host is signed as the URL writes it (part of #246)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The Signature Specification read as though the hostname were signed with ":" and the port appended. The code signs the host segment as the URL writes it up to the first "/", lower-cased, so IPv6 brackets and a ":" with or without a port are kept. The README line, the TODO.md entry and the parser comment now say so. Model: opus-5-5
This commit is contained in:
@@ -418,8 +418,9 @@ HMAC-SHA256(secret, "host:path:query:width:height:format:expiration:quality:fit"
|
||||
|
||||
Where:
|
||||
|
||||
- `host` — source origin hostname in lower case, whatever its case in the URL,
|
||||
followed by `:` and the port when the URL has one (e.g. `cdn.example.com`)
|
||||
- `host` — source host as the URL writes it up to the first `/`, in lower case,
|
||||
keeping an IPv6 address's brackets and any `:` and port after it (e.g.
|
||||
`cdn.example.com`, `cdn.example.com:8443`, `[2001:db8::1]:8443`)
|
||||
- `path` — source path (e.g. `/photos/cat.jpg`), with each `%` written as `%25`
|
||||
and each `:` as `%3A`, so `/photos/a:b.jpg` is signed as `/photos/a%3Ab.jpg`
|
||||
- `query` — source query string, empty string if none, with `%` and `:` written
|
||||
|
||||
Reference in New Issue
Block a user