1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00

Speed up data being sent to stdout

This commit is contained in:
Sterling Hughes
2001-05-27 19:11:09 +00:00
parent 43e41ddb93
commit 5ede574d49
+3 -7
View File
@@ -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;
}