summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-05-27 19:11:09 +0000
committerSterling Hughes <sterling@php.net>2001-05-27 19:11:09 +0000
commit5ede574d49cd37e4d92bafbd7fce1e17a3d0d4ea (patch)
tree25cc7feff6fd9b172838987a7090c4f57516990c /ext/curl
parent43e41ddb93c7e7eb707a5105667bdc3dd1e06863 (diff)
downloadphp-git-5ede574d49cd37e4d92bafbd7fce1e17a3d0d4ea.tar.gz
Speed up data being sent to stdout
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/curl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/curl/curl.c b/ext/curl/curl.c
index 65016ec6cf..49ad7f2b35 100644
--- a/ext/curl/curl.c
+++ b/ext/curl/curl.c
@@ -247,10 +247,12 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
ELS_FETCH();
switch (t->method) {
+ case PHP_CURL_STDOUT:
+ PUTS(data);
+ break;
case PHP_CURL_FILE:
return fwrite(data, size, nmemb, t->fp);
case PHP_CURL_RETURN:
- case PHP_CURL_STDOUT:
smart_str_appendl(&t->buf, data, (int) length);
break;
case PHP_CURL_USER: {
@@ -766,12 +768,6 @@ PHP_FUNCTION(curl_exec)
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
smart_str_free(&ch->handlers->write->buf);
}
- else if (ch->handlers->write->method == PHP_CURL_STDOUT) {
- if (ch->handlers->write->type != PHP_CURL_BINARY)
- smart_str_0(&ch->handlers->write->buf);
- PUTS(ch->handlers->write->buf.c);
- smart_str_free(&ch->handlers->write->buf);
- }
RETURN_TRUE;
}