Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2015-01-30 16:30:34 +0300
committerdnobori <da.git@softether.co.jp>2015-01-30 16:30:34 +0300
commit06a72040a347e567bec560e3426e5ccddcf785c5 (patch)
tree4f6c27e5ee5ab118621b78bc583ac15110a681fa /src/Cedar/Wpc.c
parent75f9836ce5f0a1dea2c3fe304bbc26c962ee64bf (diff)
v4.13-9522-beta
Diffstat (limited to 'src/Cedar/Wpc.c')
-rw-r--r--src/Cedar/Wpc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Cedar/Wpc.c b/src/Cedar/Wpc.c
index 66798e4f..0215e22d 100644
--- a/src/Cedar/Wpc.c
+++ b/src/Cedar/Wpc.c
@@ -158,10 +158,11 @@ PACK *WpcCall(char *url, INTERNET_SETTING *setting, UINT timeout_connect, UINT t
char *function_name, PACK *pack, X *cert, K *key, void *sha1_cert_hash)
{
return WpcCallEx(url, setting, timeout_connect, timeout_comm, function_name, pack, cert, key,
- sha1_cert_hash, NULL, 0);
+ sha1_cert_hash, NULL, 0, NULL, NULL);
}
PACK *WpcCallEx(char *url, INTERNET_SETTING *setting, UINT timeout_connect, UINT timeout_comm,
- char *function_name, PACK *pack, X *cert, K *key, void *sha1_cert_hash, bool *cancel, UINT max_recv_size)
+ char *function_name, PACK *pack, X *cert, K *key, void *sha1_cert_hash, bool *cancel, UINT max_recv_size,
+ char *additional_header_name, char *additional_header_value)
{
URL_DATA data;
BUF *b, *recv;
@@ -190,6 +191,12 @@ PACK *WpcCallEx(char *url, INTERNET_SETTING *setting, UINT timeout_connect, UINT
WriteBufInt(b, 0);
SeekBuf(b, 0, 0);
+ if (IsEmptyStr(additional_header_name) == false && IsEmptyStr(additional_header_value) == false)
+ {
+ StrCpy(data.AdditionalHeaderName, sizeof(data.AdditionalHeaderName), additional_header_name);
+ StrCpy(data.AdditionalHeaderValue, sizeof(data.AdditionalHeaderValue), additional_header_value);
+ }
+
recv = HttpRequestEx(&data, setting, timeout_connect, timeout_comm, &error,
false, b->Buf, NULL, NULL, sha1_cert_hash, cancel, max_recv_size);
@@ -822,6 +829,11 @@ BUF *HttpRequestEx2(URL_DATA *data, INTERNET_SETTING *setting,
AddHttpValue(h, NewHttpValue("Content-Length", len_str));
}
+ if (IsEmptyStr(data->AdditionalHeaderName) == false && IsEmptyStr(data->AdditionalHeaderValue) == false)
+ {
+ AddHttpValue(h, NewHttpValue(data->AdditionalHeaderName, data->AdditionalHeaderValue));
+ }
+
if (use_http_proxy)
{
AddHttpValue(h, NewHttpValue("Proxy-Connection", "Keep-Alive"));