From 3ddd136ceda5086f52c08247505646c47a7327d7 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 15 Apr 2022 15:57:45 +0300 Subject: [PATCH] net: fix byte buffers --- vlib/net/http/backend_nix.c.v | 2 +- vlib/net/tcp_read_line.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/net/http/backend_nix.c.v b/vlib/net/http/backend_nix.c.v index 10285a798c..4f84b86c64 100644 --- a/vlib/net/http/backend_nix.c.v +++ b/vlib/net/http/backend_nix.c.v @@ -101,7 +101,7 @@ fn (req &Request) ssl_do(port int, method Method, host_name string, path string) // println(req_headers) C.BIO_puts(web, &char(req_headers.str)) mut content := strings.new_builder(100) - mut buff := [bufsize]byte{} + mut buff := [bufsize]u8{} bp := unsafe { &buff[0] } mut readcounter := 0 for { diff --git a/vlib/net/tcp_read_line.v b/vlib/net/tcp_read_line.v index 3a9dd52ae7..a9c6e2e342 100644 --- a/vlib/net/tcp_read_line.v +++ b/vlib/net/tcp_read_line.v @@ -57,7 +57,7 @@ pub fn (mut con TcpConn) read_line_max(max_line_len int) string { if !con.is_blocking { con.set_blocking(true) or {} } - mut buf := [net.max_read]byte{} // where C.recv will store the network data + mut buf := [net.max_read]u8{} // where C.recv will store the network data mut res := strings.new_builder(net.max_read) // The final result, including the ending \n. defer { unsafe { res.free() }