Alexey Borzov | 1 Nov 2009 14:30
Picon
Favicon

[PEPr] Comment on Authentication::OpenID


Are there any issues in HTTP_Request2 that prevent using it here and
require using PHP4 HTTP_Request instead?

-- 
http://pear.php.net/pepr/pepr-proposal-show.php?id=603

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Craig Constantine | 1 Nov 2009 13:43
Picon

Re: [PEAR-QA] Re: [PEAR-BUG][Reminder] Reminder about open bugs in HTML_Common

me too! (and I've been whining about this for *months*)

--
Craig Constantine - PEAR web/CVS: cconstantine - cconstantine <at> php.net

-------- Original Message --------
Subject: [PEAR-QA] Re: [PEAR-BUG][Reminder] Reminder about open bugs in
HTML_Common
From: Alexey Borzov <borz_off <at> cs.msu.su>
To: PEAR QA <pear-qa <at> lists.php.net>
Date: Sun Nov  1 04:51:01 2009

Hi,

I am still receiving "reminders" for bugs closed half a year ago.

Received: from pb12.pair.com (pb12.pair.com [216.92.131.66])

Can someone having access to that box AND a bit of clue about cron
finally kill that job?

PEAR QA wrote:
PEAR Bug Database summary for HTML_Common -
http://pear.php.net/bugs

ID  Status     Summary

15787 Open      _parseAttributes with strings trimmed blank of
attribute values. Further comments can be seen at
http://pear.php.net/bugs/15787 Edit this bug report at
(Continue reading)

Alexey Borzov | 1 Nov 2009 13:50
Picon
Favicon

Re: [PEPr] Comment on Authentication::OpenID

Hi,

Alexey Borzov wrote:
> Are there any issues in HTTP_Request2 that prevent using it here and
> require using PHP4 HTTP_Request instead?

Ah, me stupid, me no can read. :[

I'll think about enabling redirect support in HTTP_Request2 and / or porting 
HTTP_Client to PHP5.

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Alexey Borzov | 1 Nov 2009 16:40
Picon
Favicon

Redirect (and cookies) support in HTTP_Request2 / HTTP_Client2?

Hi,

I'd like to gather some feedback on how to properly implement redirect and 
cookies support in HTTP_Request2 and / or HTTP_Client2.

First, a bit of background. Redirect support was first done in HTTP_Request by 
its original author, but as the class wasn't designed from the ground up for 
performing multiple requests, redirect implementation was a bit of a hack. It is 
currently disabled by default and its use is discouraged.

HTTP_Client has a cleaner implementation, it uses a new instance of HTTP_Request 
for doing a redirect, has proper code for resolving relative URLs.

HTTP_Client also has the following useful features:
  * Stores cookies between requests (persistent storage is also possible);
  * Stores default headers, default request parameters and default listeners. 
These are added to all created instances of HTTP_Request;
  * Can store complete response history;
  * get() / post() / head() / put() / delete() convenience methods.

Now, skip to HTTP_Request2. I suspect that if one enables redirect support in 
cURL adapter, it will work out of the box. It also isn't that difficult to add 
naïve redirect implementation to Socket adapter, only a matter of porting the 
relevant code from HTTP_Client::_performRequest().

I'd also like to implement cookie storage support, though, and make us of Public 
Suffix List (http://publicsuffix.org/). The big question is implementing that 
*and* redirect support. Cookies can easily be extracted from redirect responses 
via Observers, but can they also be injected there (esp. with Curl)? If it's not 
possible, then Curl's native redirect support can not be used and the same 
(Continue reading)

Bill Shupp | 1 Nov 2009 18:22
Gravatar

[PEPr] Comment on Authentication::OpenID


Alexey:  Yes.  From the proposal description:  "HTTP_Request is used
instead of HTTP_Request2 because following redirects was not included in
HTTP_Request2...".  However, I do need ssl peer/host verification, and I'm
not sure if HTTP_Request even supports that at this time.  So something
needs to change.

-- 
http://pear.php.net/pepr/pepr-proposal-show.php?id=603

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

till | 1 Nov 2009 17:30
Picon
Gravatar

Re: Redirect (and cookies) support in HTTP_Request2 / HTTP_Client2?

On Sun, Nov 1, 2009 at 4:40 PM, Alexey Borzov <borz_off <at> cs.msu.su> wrote:
> Hi,
>
> I'd like to gather some feedback on how to properly implement redirect and
> cookies support in HTTP_Request2 and / or HTTP_Client2.
>
>
> First, a bit of background. Redirect support was first done in HTTP_Request
> by its original author, but as the class wasn't designed from the ground up
> for performing multiple requests, redirect implementation was a bit of a
> hack. It is currently disabled by default and its use is discouraged.
>
> HTTP_Client has a cleaner implementation, it uses a new instance of
> HTTP_Request for doing a redirect, has proper code for resolving relative
> URLs.
>
> HTTP_Client also has the following useful features:
>  * Stores cookies between requests (persistent storage is also possible);
>  * Stores default headers, default request parameters and default listeners.
> These are added to all created instances of HTTP_Request;
>  * Can store complete response history;
>  * get() / post() / head() / put() / delete() convenience methods.
>
>
> Now, skip to HTTP_Request2. I suspect that if one enables redirect support
> in cURL adapter, it will work out of the box. It also isn't that difficult
> to add naïve redirect implementation to Socket adapter, only a matter of
> porting the relevant code from HTTP_Client::_performRequest().
>
>
(Continue reading)

Bill Shupp | 1 Nov 2009 17:59
Gravatar

Re: Redirect (and cookies) support in HTTP_Request2 / HTTP_Client2?

On Nov 1, 2009, at 7:40 AM, Alexey Borzov wrote:

> Hi,
>
> I'd like to gather some feedback on how to properly implement  
> redirect and cookies support in HTTP_Request2 and / or HTTP_Client2.
>
>
> First, a bit of background. Redirect support was first done in  
> HTTP_Request by its original author, but as the class wasn't  
> designed from the ground up for performing multiple requests,  
> redirect implementation was a bit of a hack. It is currently  
> disabled by default and its use is discouraged.
>
> HTTP_Client has a cleaner implementation, it uses a new instance of  
> HTTP_Request for doing a redirect, has proper code for resolving  
> relative URLs.
>
> HTTP_Client also has the following useful features:
> * Stores cookies between requests (persistent storage is also  
> possible);
> * Stores default headers, default request parameters and default  
> listeners. These are added to all created instances of HTTP_Request;
> * Can store complete response history;
> * get() / post() / head() / put() / delete() convenience methods.
>
>
> Now, skip to HTTP_Request2. I suspect that if one enables redirect  
> support in cURL adapter, it will work out of the box. It also isn't  
> that difficult to add naïve redirect implementation to Socket  
(Continue reading)

Michael Gauthier | 1 Nov 2009 21:24
Favicon
Gravatar

Re: Redirect (and cookies) support in HTTP_Request2 / HTTP_Client2?

On Sun, 2009-11-01 at 18:40 +0300, Alexey Borzov wrote:
> Hi,
> 
> I'd like to gather some feedback on how to properly implement redirect and 
> cookies support in HTTP_Request2 and / or HTTP_Client2.
> 
> 
> First, a bit of background. Redirect support was first done in HTTP_Request by 
> its original author, but as the class wasn't designed from the ground up for 
> performing multiple requests, redirect implementation was a bit of a hack. It is 
> currently disabled by default and its use is discouraged.
> 
> HTTP_Client has a cleaner implementation, it uses a new instance of HTTP_Request 
> for doing a redirect, has proper code for resolving relative URLs.
> 
> HTTP_Client also has the following useful features:
>   * Stores cookies between requests (persistent storage is also possible);
>   * Stores default headers, default request parameters and default listeners. 
> These are added to all created instances of HTTP_Request;
>   * Can store complete response history;
>   * get() / post() / head() / put() / delete() convenience methods.
> 
> 
> Now, skip to HTTP_Request2. I suspect that if one enables redirect support in 
> cURL adapter, it will work out of the box. It also isn't that difficult to add 
> naïve redirect implementation to Socket adapter, only a matter of porting the 
> relevant code from HTTP_Client::_performRequest().
> 
> 
> I'd also like to implement cookie storage support, though, and make us of Public 
(Continue reading)

Alexey Borzov | 1 Nov 2009 22:28
Picon
Favicon

Re: Redirect (and cookies) support in HTTP_Request2 / HTTP_Client2?

Hi Michael,

Michael Gauthier wrote:
>> Now, skip to HTTP_Request2. I suspect that if one enables redirect support in 
>> cURL adapter, it will work out of the box. It also isn't that difficult to add 
>> naïve redirect implementation to Socket adapter, only a matter of porting the 
>> relevant code from HTTP_Client::_performRequest().
>>
>>
>> I'd also like to implement cookie storage support, though, and make us of Public 
>> Suffix List (http://publicsuffix.org/). The big question is implementing that 
>> *and* redirect support. Cookies can easily be extracted from redirect responses 
>> via Observers, but can they also be injected there (esp. with Curl)? If it's not 
>> possible, then Curl's native redirect support can not be used and the same 
>> PHP-based implementation should be used for both adapters. It will be easier to 
>> push that to a separate class (HTTP_Client2?).
>>
>>
>> Also I'm interested whether other features of HTTP_Client are still as relevant 
>> with HTTP_Request2 as they were with HTTP_Request.
>>
> 
> I think splitting cookie-handling and redirect support into a separate
> package makes sense. It's the easiest way to make it possible to get the
> complete response history for redirects, and to have persistent cookie
> storage backends.

Note that complete response history for redirects will be available in either 
case due to Observers.

(Continue reading)

Alexey Borzov | 1 Nov 2009 22:38
Picon
Favicon

Re: Redirect (and cookies) support in HTTP_Request2 / HTTP_Client2?

Hi Bill,

Bill Shupp wrote:
> My feeling is that I don't think we need both HTTP_Client2 and 
> HTTP_Request2 going forward.  Just put the missing features in 
> HTTP_Request2.  My current feature interest is that of redirects, but I 
> can see the other HTTP_Client features being useful as well if you want 
> to bring them over.

I tend to agree that a separate package doesn't make sense. I'll probably be 
able to add redirect support to HTTP_Request2 in a few weeks, Cookie jar support 
is a more exotic feature and can wait a bit longer.

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Gmane