libfreerdp-core: fix bug in HTTP response parsing

This commit is contained in:
Marc-André Moreau 2012-11-13 17:02:01 -05:00
parent 82725a2df7
commit a55b1ffce1
2 changed files with 6 additions and 3 deletions

View File

@ -418,12 +418,15 @@ HttpResponse* http_response_recv(rdpTls* tls)
}
else
{
http_response_free(http_response) ;
http_response_free(http_response);
return NULL;
break;
}
header_end = strstr((char*) buffer, "\r\n\r\n") + 2;
header_end = strstr((char*) buffer, "\r\n\r\n");
if (header_end)
header_end += 2;
if (header_end != NULL)
{

View File

@ -85,7 +85,7 @@ BOOL rts_connect(rdpRpc* rpc)
if (http_response->StatusCode != 200)
{
printf("rts_connect error!\n");
printf("rts_connect error! Status Code: %d\n", http_response->StatusCode);
http_response_print(http_response);
http_response_free(http_response) ;
return FALSE;