http: fix new warnings (#6153)
parent
fa11e124dd
commit
dab639662f
|
@ -41,7 +41,7 @@ fn (req &Request) ssl_do(port int, method Method, host_name, path string) ?Respo
|
||||||
//println(req_headers)
|
//println(req_headers)
|
||||||
C.BIO_puts(web, req_headers.str)
|
C.BIO_puts(web, req_headers.str)
|
||||||
mut content := strings.new_builder(100)
|
mut content := strings.new_builder(100)
|
||||||
mut buff := [bufsize]byte
|
mut buff := [bufsize]byte{}
|
||||||
mut readcounter := 0
|
mut readcounter := 0
|
||||||
for {
|
for {
|
||||||
readcounter++
|
readcounter++
|
||||||
|
|
|
@ -21,5 +21,5 @@ fn (req &Request) ssl_do(port int, method Method, host_name, path string) ?Respo
|
||||||
length := int(C.request(&ctx, port, addr.to_wide(), sdata.str, &buff))
|
length := int(C.request(&ctx, port, addr.to_wide(), sdata.str, &buff))
|
||||||
|
|
||||||
C.vschannel_cleanup(&ctx)
|
C.vschannel_cleanup(&ctx)
|
||||||
return parse_response(string(buff, length))
|
return parse_response(buff.vstring_with_len(length))
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,7 +410,7 @@ pub fn escape(s string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (req &Request) http_do(port int, method Method, host_name, path string) ?Response {
|
fn (req &Request) http_do(port int, method Method, host_name, path string) ?Response {
|
||||||
rbuffer := [bufsize]byte
|
rbuffer := [bufsize]byte{}
|
||||||
mut sb := strings.new_builder(100)
|
mut sb := strings.new_builder(100)
|
||||||
s := req.build_request_headers(method, host_name, path)
|
s := req.build_request_headers(method, host_name, path)
|
||||||
client := net.dial(host_name, port) or {
|
client := net.dial(host_name, port) or {
|
||||||
|
|
Loading…
Reference in New Issue