* ecore_con_url: When download was broken in the middle, you could

have a status of 200 without all data being downloaded. This should
	fix this case.


SVN revision: 43805
This commit is contained in:
Cedric BAIL 2009-11-19 18:45:51 +00:00
parent 797833357f
commit d78f1d48cf
1 changed files with 9 additions and 4 deletions

View File

@ -1186,12 +1186,17 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete));
if (e)
{
long status; /* curl API uses long, not int */
e->url_con = url_con;
e->status = 0;
curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &status);
e->status = status;
if (curlmsg->data.result == CURLE_OK)
{
long status; /* curl API uses long, not int */
status = 0;
curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &status);
e->status = status;
}
_url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e);
}
curl_multi_remove_handle(curlm, url_con->curl_easy);