mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
http: avoid costly string interpolation of resp.body (#15376)
This commit is contained in:
parent
d74cf084fb
commit
0b1486f014
@ -31,7 +31,7 @@ pub fn (resp Response) bytes() []u8 {
|
||||
pub fn (resp Response) bytestr() string {
|
||||
return 'HTTP/$resp.http_version $resp.status_code $resp.status_msg\r\n' + '${resp.header.render(
|
||||
version: resp.version()
|
||||
)}\r\n' + '$resp.body'
|
||||
)}\r\n' + resp.body
|
||||
}
|
||||
|
||||
// Parse a raw HTTP response into a Response object
|
||||
|
Loading…
Reference in New Issue
Block a user