net.http: wrap unsafe{} around req.headers.free() (#5891)

pull/5892/head
Carlos Esquerdo Bernat 2020-07-20 14:39:46 +02:00 committed by GitHub
parent c858978348
commit 60997b3052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -191,11 +191,15 @@ fn build_url_from_fetch(_url string, config FetchConfig) ?string {
}
fn (mut req Request) free() {
req.headers.free()
unsafe {
req.headers.free()
}
}
fn (mut resp Response) free() {
resp.headers.free()
unsafe {
resp.headers.free()
}
}
// add_header adds the key and value of an HTTP request header