proxy: Add received response in case of an error
This commit is contained in:
parent
05a865281e
commit
4e06855826
@ -388,6 +388,18 @@ BOOL proxy_connect(rdpSettings* settings, BIO* bufferedBio, const char* proxyUse
|
||||
}
|
||||
}
|
||||
|
||||
static const char* get_response_header(char* response)
|
||||
{
|
||||
char* current_pos = strchr(response, '\r');
|
||||
if (!current_pos)
|
||||
current_pos = strchr(response, '\n');
|
||||
|
||||
if (current_pos)
|
||||
*current_pos = '\0';
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
static BOOL http_proxy_connect(BIO* bufferedBio, const char* hostname, UINT16 port)
|
||||
{
|
||||
int status;
|
||||
@ -425,7 +437,7 @@ static BOOL http_proxy_connect(BIO* bufferedBio, const char* hostname, UINT16 po
|
||||
{
|
||||
if (resultsize >= sizeof(recv_buf) - 1)
|
||||
{
|
||||
WLog_ERR(TAG, "HTTP Reply headers too long.");
|
||||
WLog_ERR(TAG, "HTTP Reply headers too long: %s", get_response_header(recv_buf));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user