Skip to content

Commit 812ed37

Browse files
committed
Fix some OCSP request over proxy
IB-3667
1 parent 4d3f2dd commit 812ed37

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/crypto/Connect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Connect::Connect(const string &_url, const string &method, int timeout, const st
4545
string host = _host ? _host : "";
4646
string port = _port ? _port : "80";
4747
string path = _path ? _path : "/";
48-
string url = _path ? _url : _url + "/";
48+
string url = strlen(_path) == 1 && _path[0] == '/' && _url[_url.size() - 1] != '/' ? _url + "/" : _url;
4949
OPENSSL_free(_host);
5050
OPENSSL_free(_port);
5151
OPENSSL_free(_path);

src/crypto/OCSP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ OCSP_RESPONSE* OCSP::sendRequest(const string &_url, OCSP_REQUEST *req, const st
312312
string hostname = host ? host : "";
313313
if(port)
314314
hostname += ":" + string(port);
315-
string url = path ? _url : _url + "/";
315+
string url = strlen(path) == 1 && path[0] == '/' && _url[_url.size() - 1] != '/' ? _url + "/" : _url;
316316
OPENSSL_free(host);
317317
OPENSSL_free(port);
318318
OPENSSL_free(path);

0 commit comments

Comments
 (0)