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
4
thirdparty/vschannel/vschannel.c
vendored
4
thirdparty/vschannel/vschannel.c
vendored
@ -134,7 +134,7 @@ void vschannel_init() {
|
||||
tls_ctx.creds_initialized = TRUE;
|
||||
}
|
||||
|
||||
INT request(CHAR *host, CHAR *req, CHAR *out)
|
||||
INT request(INT iport, CHAR *host, CHAR *req, CHAR *out)
|
||||
{
|
||||
SecBuffer ExtraData;
|
||||
SECURITY_STATUS Status;
|
||||
@ -147,6 +147,8 @@ INT request(CHAR *host, CHAR *req, CHAR *out)
|
||||
|
||||
protocol = SP_PROT_TLS1_2_CLIENT;
|
||||
|
||||
port_number = iport;
|
||||
|
||||
// Connect to server.
|
||||
if(connect_to_server(host, port_number)) {
|
||||
printf("Error connecting to server\n");
|
||||
|
2
thirdparty/vschannel/vschannel.h
vendored
2
thirdparty/vschannel/vschannel.h
vendored
@ -25,7 +25,7 @@ static void vschannel_init();
|
||||
|
||||
static void vschannel_cleanup();
|
||||
|
||||
static INT request(CHAR *host, CHAR *req, CHAR *out);
|
||||
static INT request(INT iport, CHAR *host, CHAR *req, CHAR *out);
|
||||
|
||||
static SECURITY_STATUS https_make_request(
|
||||
CHAR *req, CHAR *out, int *length);
|
||||
|
Reference in New Issue
Block a user