1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

http: remove superfluous new line in stdout, when making a http request.

This commit is contained in:
Delyan Angelov 2019-08-10 16:04:41 +03:00 committed by Alexander Medvednikov
parent 5a84a4e507
commit 2197c210e7

View File

@ -61,7 +61,6 @@ fn ssl_do(method, host_name, path string) Response {
if res != 1 { if res != 1 {
} }
res = C.SSL_set_tlsext_host_name(ssl, host_name.str) res = C.SSL_set_tlsext_host_name(ssl, host_name.str)
out := C.BIO_new_fp(stdout, C.BIO_NOCLOSE)
res = C.BIO_do_connect(web) res = C.BIO_do_connect(web)
res = C.BIO_do_handshake(web) res = C.BIO_do_handshake(web)
cert := C.SSL_get_peer_certificate(ssl) cert := C.SSL_get_peer_certificate(ssl)
@ -69,7 +68,6 @@ fn ssl_do(method, host_name, path string) Response {
/////// ///////
s := build_request_headers('', method, host_name, path) s := build_request_headers('', method, host_name, path)
C.BIO_puts(web, s.str) C.BIO_puts(web, s.str)
C.BIO_puts(out, '\n')
mut sb := strings.new_builder(100) mut sb := strings.new_builder(100)
for { for {
buff := [1536]byte buff := [1536]byte
@ -81,9 +79,6 @@ fn ssl_do(method, host_name, path string) Response {
break break
} }
} }
if !isnil(out) {
C.BIO_free(out)
}
if !isnil(web) { if !isnil(web) {
C.BIO_free_all(web) C.BIO_free_all(web)
} }