I have already run this past Sterling, but figured I would make sure
there are no other objections to applying this patch to both 4.3 and
HEAD.
It allows switching back to the standard output by calling:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
Thanks,
Brian
---- Based on 4.3.4 source ---
--- ext/curl/curl.c.orig Fri Feb 20 13:35:39 2004
+++ ext/curl/curl.c Fri Feb 20 13:37:15 2004
@@ -803,6 +809,9 @@
if (Z_LVAL_PP(zvalue)) {
ch->handlers->write->method =
PHP_CURL_RETURN;
}
-
else {
-
ch->handlers->write->method =
PHP_CURL_STDOUT;
-
} break; case CURLOPT_BINARYTRANSFER: convert_to_long_ex(zvalue);
Why is this needed?
As far as I know curl extension already prints to screen by default. The only
instance where this maybe useful, is when making multiple request via the
same handle and you want to print only the output of certain requests, which
seems rather strange to me.
Ilia
I have already run this past Sterling, but figured I would make sure
there are no other objections to applying this patch to both 4.3 and
HEAD.It allows switching back to the standard output by calling:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
Thanks,
Brian
True, but I had a group request it and tested the patch so I figured I
would see about giving it back.
Brian
Why is this needed?
As far as I know curl extension already prints to screen by default.
The only
instance where this maybe useful, is when making multiple request via
the
same handle and you want to print only the output of certain requests,
which
seems rather strange to me.
True, but I had a group request it and tested the patch so I figured I
would see about giving it back.
I was hoping you had some additional technical reasons for the patch that I
had missed. As it stands now, I am +1 for including this patch in PHP 5.0 and
-0 for including it in PHP 4.3.X simply due to the dubious value (imho) of
the added functionality.
Ilia