Re: Add a constant to reflect --with-curlwrappers

From: Date: Fri, 05 Apr 2013 09:19:25 +0000
Subject: Re: Add a constant to reflect --with-curlwrappers
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-66969@lists.php.net to get a copy of this message
On Fri, Apr 5, 2013 at 8:01 AM, Pierre Joye <pierre.php@gmail.com> wrote: > On Thu, Apr 4, 2013 at 9:52 PM, Hannes Magnusson > <hannes.magnusson@gmail.com> wrote: > > > Its not only about maintaining it. > > This experiment failed a long time ago. Overwriting the core streams > > has proven itself to be the wrong way. > > I cannot agree more. > > > If there was a way for userspace to say "overload with curl" then thats > fine. > > We already have a procedure for this: > > > > stream_wrapper_unregister("http"); > > stream_wrapper_register("http", "CurlStreamWrapper"); > > and then stream_wrapper_restore("http") to go back to the core streams. > > > > I wonder what one will do with open streams during the switches. That > can't go well. > Hey, that's true, we may meet strange behavior. I would say, why not create a new wrapper protocol, aka "curl://". I know it is more ugly than "http://" , but "curl://" solves the problem doesn't it ? I wonder how we could use curl other protocols than http using curl:// though :p Julien.P

« previous php.internals (#66969) next »