net: fix byte buffers
parent
bbfd6900fa
commit
3ddd136ced
|
@ -101,7 +101,7 @@ fn (req &Request) ssl_do(port int, method Method, host_name string, path string)
|
||||||
// println(req_headers)
|
// println(req_headers)
|
||||||
C.BIO_puts(web, &char(req_headers.str))
|
C.BIO_puts(web, &char(req_headers.str))
|
||||||
mut content := strings.new_builder(100)
|
mut content := strings.new_builder(100)
|
||||||
mut buff := [bufsize]byte{}
|
mut buff := [bufsize]u8{}
|
||||||
bp := unsafe { &buff[0] }
|
bp := unsafe { &buff[0] }
|
||||||
mut readcounter := 0
|
mut readcounter := 0
|
||||||
for {
|
for {
|
||||||
|
|
|
@ -57,7 +57,7 @@ pub fn (mut con TcpConn) read_line_max(max_line_len int) string {
|
||||||
if !con.is_blocking {
|
if !con.is_blocking {
|
||||||
con.set_blocking(true) or {}
|
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.
|
mut res := strings.new_builder(net.max_read) // The final result, including the ending \n.
|
||||||
defer {
|
defer {
|
||||||
unsafe { res.free() }
|
unsafe { res.free() }
|
||||||
|
|
Loading…
Reference in New Issue