- http_error_ex(HE_WARNING, HTTP_E_REQUEST, "%s; %s (%s)", curl_easy_strerror(result), request->_error, request->url);
+ http_error_ex(HE_WARNING, HTTP_E_REQUEST, "%s; %s (%s)", curl_easy_strerror(result), http_request_storage_get(request->ch)->errorbuffer, request->url);
+#ifdef ZEND_ENGINE_2
+ if ((HTTP_G->only_exceptions || GLOBAL_ERROR_HANDLING == EH_THROW) && EG(exception)) {
+ add_property_long(EG(exception), "curlCode", result);
+ }
+#endif
+
+ if (request->_retry.count > tries++) {
+ switch (result) {
+ case CURLE_COULDNT_RESOLVE_PROXY:
+ case CURLE_COULDNT_RESOLVE_HOST:
+ case CURLE_COULDNT_CONNECT:
+ case CURLE_WRITE_ERROR:
+ case CURLE_READ_ERROR:
+ case CURLE_OPERATION_TIMEDOUT:
+ case CURLE_SSL_CONNECT_ERROR:
+ case CURLE_GOT_NOTHING:
+ case CURLE_SSL_ENGINE_SETFAILED:
+ case CURLE_SEND_ERROR:
+ case CURLE_RECV_ERROR:
+ case CURLE_SSL_ENGINE_INITFAILED:
+ case CURLE_LOGIN_DENIED:
+ if (request->_retry.delay >= HTTP_DIFFSEC) {
+ http_sleep(request->_retry.delay);
+ }
+ goto retry;
+ default:
+ break;
+ }
+ }