Web: HttpClient::GetBody (in case that returned value is Null because of error)

git-svn-id: svn://ultimatepp.org/upp/trunk@4501 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-01-31 09:11:55 +00:00
parent e7f7158183
commit 3ee821a182
2 changed files with 3 additions and 1 deletions

View file

@ -424,7 +424,7 @@ String HttpClient::Execute(Gate2<int, int> progress)
return String::GetVoid(); return String::GetVoid();
} }
String chunked; String chunked;
String body; body.Clear();
while(body.GetLength() < content_length || content_length < 0 || tc_chunked) { while(body.GetLength() < content_length || content_length < 0 || tc_chunked) {
if(msecs(end_time) >= 0) { if(msecs(end_time) >= 0) {

View file

@ -61,6 +61,7 @@ public:
int GetStatusCode() const { return status_code; } int GetStatusCode() const { return status_code; }
String GetStatusLine() const { return status_line; } String GetStatusLine() const { return status_line; }
String GetHeaders() const { return server_headers; } String GetHeaders() const { return server_headers; }
String GetBody() const { return body; }
bool IsRedirect() const { return is_redirect; } bool IsRedirect() const { return is_redirect; }
String GetRedirectURL() const { return redirect_url; } String GetRedirectURL() const { return redirect_url; }
@ -81,6 +82,7 @@ public:
bool aborted; bool aborted;
bool force_digest; bool force_digest;
String error; String error;
String body;
int timeout_msecs; int timeout_msecs;
int max_header_size; int max_header_size;