X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_request_api.c;h=d07305e6930fb84e51fe953af5ca781f18534623;hb=96c0ae82ca8cda98d70b87597d765a9d050129de;hp=3fa73e217e6c6ebe9d651ab3ee3eded5981399a1;hpb=74b9f91575137bb94dfccb54bd5fd6a17d077c43;p=m6w6%2Fext-http diff --git a/http_request_api.c b/http_request_api.c index 3fa73e2..d07305e 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -412,6 +412,7 @@ PHP_HTTP_API void _http_request_reset(http_request *request) if (request->ch) { http_request_defaults(request); } + request->_error[0] = '\0'; } /* }}} */ @@ -872,6 +873,7 @@ PHP_HTTP_API void _http_request_info(http_request *request, HashTable *info) HTTP_CURL_INFO(CURLINFO_HTTPAUTH_AVAIL); HTTP_CURL_INFO(CURLINFO_PROXYAUTH_AVAIL); HTTP_CURL_INFO(CURLINFO_OS_ERRNO); + add_assoc_string(&array, "error", request->_error, 1); HTTP_CURL_INFO(CURLINFO_NUM_CONNECTS); #if LIBCURL_VERSION_NUM >= 0x070e01 HTTP_CURL_INFO_EX(CURLINFO_COOKIELIST, "cookies");