# Patch now or wait

- Thread: https://externals.io/message/8106
- Original archive: https://news-web.php.net/php.internals/8106
- Started by Brian J. France on 2004-02-24T22:10:51+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8106 — Brian J. France — 2004-02-24T22:10:51+00:00

URL: https://externals.io/message/8106#8106

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);

---

## #8107 — Ilia Alshanetsky — 2004-02-24T23:01:00+00:00

URL: https://externals.io/message/8106#8107 · In reply to: #8106

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

---

## #8110 — Brian J. France — 2004-02-25T00:41:18+00:00

URL: https://externals.io/message/8106#8110 · In reply to: #8107

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.

---

## #8111 — Ilia Alshanetsky — 2004-02-25T00:46:22+00:00

URL: https://externals.io/message/8106#8111 · In reply to: #8110

> 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
