Re: HTTP_Request not following redirects
| From: | diro at nixsys dot bz | Date: | Sun, 03 Dec 2006 18:56:49 +0000 |
| Subject: | Re: HTTP_Request not following redirects | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25964@lists.php.net to get a copy of this message | ||
On Sun, Dec 03, 2006 at 09:43:12AM -0800, Justin Patrin wrote:
> On 12/1/06, diro@nixsys.bz <diro@nixsys.bz> wrote:
> >Hello,
> >
> >Here's the sample code:
> >
> ><?php
> >
> > include ('HTTP/Request.php');
> >
> > $req = &new
> > HTTP_Request('http://www.$SITE.com/cgistuff.cgi',
> > array('allowRedirects'=>true));
> >
> > $req->setMethod(HTTP_REQUEST_METHOD_POST);
> >
> > $req->addPostData('var1', 'arg1');
> >
> > $req->addPostData('var2', 'arg2');
> >
> > $req->addPostData('var3', 'arg3');
> >
> > $req->sendRequest();$response1 = $req->getResponseBody();
> >
> > echo $response1;
> >
> >?>
> >
> >Now, i know it's POSTing correctly, because of the address returned in the
> >headers. I can see via getResponseCode that it's 302, obviously not
> >redirecting
> >for some reason.
> >
> >Any ideas? Need more info?
> >
>
> What version of HTTP_Request are you using? Have you tried upgrading it?
1.2.3
This was the version in pkgsrc-2006Q3. The version in pkgsrc-current is 1.3.0
I'll see if 1.4.0 can be committed into pkgsrc-current.