mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
http: support plain http protocol
This commit is contained in:
committed by
Alexander Medvednikov
parent
e35ef3b83e
commit
51818346df
@@ -38,7 +38,7 @@ fn init_module() {
|
||||
//C.OPENSSL_config(0)
|
||||
}
|
||||
|
||||
fn ssl_do(method, host_name, path string) Response {
|
||||
fn ssl_do(port int, method, host_name, path string) Response {
|
||||
//ssl_method := C.SSLv23_method()
|
||||
ssl_method := C.TLSv1_2_method()
|
||||
if isnil(method) {
|
||||
@@ -55,7 +55,7 @@ fn ssl_do(method, host_name, path string) Response {
|
||||
web := C.BIO_new_ssl_connect(ctx)
|
||||
if isnil(ctx) {
|
||||
}
|
||||
addr := host_name + ':443'
|
||||
addr := host_name + ':' + port.str()
|
||||
res = C.BIO_set_conn_hostname(web, addr.str)
|
||||
if res != 1 {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user