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

http: Request.host

This commit is contained in:
Alexander Medvednikov 2023-07-14 14:26:03 +03:00
parent 8ecad5abf8
commit f1bc5e6d46

View File

@ -17,6 +17,7 @@ pub mut:
version Version = .v1_1 version Version = .v1_1
method Method method Method
header Header header Header
host string
cookies map[string]string cookies map[string]string
data string data string
url string url string
@ -224,6 +225,7 @@ pub fn parse_request_head(mut reader io.BufferedReader) !Request {
method: method method: method
url: target.str() url: target.str()
header: header header: header
host: header.get(.host) or { '' }
version: version version: version
cookies: request_cookies cookies: request_cookies
} }