mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
net,vweb: reduce allocations by ~80%
This commit is contained in:
parent
b3a9701129
commit
e7cad4f55d
12 changed files with 464 additions and 91 deletions
|
@ -59,8 +59,9 @@ pub fn read_set_cookies(h map[string][]string) []&Cookie {
|
|||
// returns the successfully parsed Cookies.
|
||||
//
|
||||
// if `filter` isn't empty, only cookies of that name are returned
|
||||
pub fn read_cookies(h map[string][]string, filter string) []&Cookie {
|
||||
lines := h['Cookie']
|
||||
pub fn read_cookies(h Header, filter string) []&Cookie {
|
||||
// lines := h['Cookie']
|
||||
lines := h.values(.cookie) // or {
|
||||
if lines.len == 0 {
|
||||
return []
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue