From: Michael Wallner Date: Wed, 16 Apr 2014 18:05:23 +0000 (+0200) Subject: catch "uploaded" state X-Git-Tag: RELEASE_2_0_7~33 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=fc074c680e1f368e06c2eeaa0656502c45a25ca5;p=m6w6%2Fext-http catch "uploaded" state --- diff --git a/php_http_client_curl.c b/php_http_client_curl.c index c691842..418a4c6 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -258,6 +258,8 @@ static int php_http_curle_raw_callback(CURL *ch, curl_infotype type, char *data, h->progress.info = "blacklist check"; } else if (php_memnstr(data, ZEND_STRL("SSL"), data + length)) { h->progress.info = "ssl negotiation"; + } else if (php_memnstr(data, ZEND_STRL("upload"), data + length)) { + h->progress.info = "uploaded"; } else if (php_memnstr(data, ZEND_STRL("left intact"), data + length)) { h->progress.info = "not disconnected"; } else if (php_memnstr(data, ZEND_STRL("closed"), data + length)) { @@ -269,6 +271,7 @@ static int php_http_curle_raw_callback(CURL *ch, curl_infotype type, char *data, } else { #if PHP_DEBUG h->progress.info = data; + data[length - 1] = '\0'; #endif } if (h->client->callback.progress.func) {