http: set buffer size to 1536
parent
5d08c9d5a8
commit
80070516fd
|
@ -11,6 +11,7 @@ import net
|
||||||
const (
|
const (
|
||||||
max_redirects = 4
|
max_redirects = 4
|
||||||
content_type_default = 'text/plain'
|
content_type_default = 'text/plain'
|
||||||
|
bufsize = 1536
|
||||||
)
|
)
|
||||||
|
|
||||||
pub struct Request {
|
pub struct Request {
|
||||||
|
@ -380,10 +381,6 @@ pub fn escape(s string) string {
|
||||||
panic('http.escape() was replaced with http.escape_url()')
|
panic('http.escape() was replaced with http.escape_url()')
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
|
||||||
bufsize = 512
|
|
||||||
)
|
|
||||||
|
|
||||||
fn (req &Request) http_do(port int, method, host_name, path string) ?Response {
|
fn (req &Request) http_do(port int, method, host_name, path string) ?Response {
|
||||||
rbuffer := [bufsize]byte
|
rbuffer := [bufsize]byte
|
||||||
mut sb := strings.new_builder(100)
|
mut sb := strings.new_builder(100)
|
||||||
|
|
Loading…
Reference in New Issue