From eece058f18460e0435fff52fd7bbbd6543c95655 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 6 Aug 2019 13:57:58 +0200 Subject: [PATCH] h1 --- vlib/http/http_test.v | 6 ++++++ vlib/http/openssl_backend.v | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/vlib/http/http_test.v b/vlib/http/http_test.v index 1de50ac59a..1a76fa773d 100644 --- a/vlib/http/http_test.v +++ b/vlib/http/http_test.v @@ -1,4 +1,5 @@ import net.urllib +import http fn test_escape_unescape() { /* @@ -10,3 +11,8 @@ fn test_escape_unescape() { */ } +fn test_http_get() { + assert http.get_text('https://vlang.io/version') == '0.1.5' + println('http ok') +} + diff --git a/vlib/http/openssl_backend.v b/vlib/http/openssl_backend.v index 1b15d58310..b932ae96ff 100644 --- a/vlib/http/openssl_backend.v +++ b/vlib/http/openssl_backend.v @@ -15,10 +15,14 @@ struct C.SSL { } +fn init_module() { + init_openssl() +} + fn init_openssl() { C.SSL_library_init() - C.SSL_load_error_strings() - C.OPENSSL_config(0) + //C.SSL_load_error_strings() + //C.OPENSSL_config(0) } fn ssl_do(method, host_name, path string) string {