1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: refactor routing logic (#9025)

This commit is contained in:
Miccah
2021-03-01 04:50:52 -06:00
committed by GitHub
parent 8045395cbd
commit d0fab60981
6 changed files with 434 additions and 178 deletions

View File

@ -419,6 +419,11 @@ pub fn (h Header) values_str(key string) []string {
return h.data[k]
}
// Gets all header keys as strings
pub fn (h Header) keys() []string {
return h.data.keys()
}
// Validate and canonicalize an HTTP header key
// A canonical header is all lowercase except for the first character
// and any character after a `-`. Example: `Example-Header-Key`