[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Re: Failing redirects


----- Original Message ----- 
From: "Todd Ross" <suppressed>
To: <suppressed>
Sent: Tuesday, March 06, 2007 12:26 PM
Subject: Re: [cgiapp] Re: Failing redirects


> news <suppressed> wrote on 03/06/2007 10:39:27 AM:
>
> > Jonathan Mangin wrote:
> > > Hi,
> > >
> > > The disk mounted on /usr/local failed and I had to
> > > reinstall everything.  I ended up with:
> > > httpd-2.0.59
> > > perl 5.8.7
> > > mod_perl-2.0.2
> > > CGI.pm 3.10
> > > C::A 4.06
> > >
> > > I have several CGI::Application scripts running under
> > > ModPerl::Registry.  They were previously working
> > > perfectly with 2.0.55/mod_perl.  Now, whenever the
> > > scripts perform a redirect, I get:
> > >
> > > OK
> > > The document has moved <a>here</a>.
> > >
> > > I configured apache with --enable-shared-mods=all
> > > so I'm loading alot of modules I know nothing about,
> > > though that message seems to be generated by the httpd
> > > binary itself.
> > >
> > > Can anyone tell me why this happens, instead
> > > of just going where it's told?
> >
> > That doesn't sound familiar. Whose generating the redirects? Apache
> > configurations, CGI.pm, possibly through CAP::Plugin::Redirect?
> >
> > I doubt CGI.pm is at fault. It just sets a Location: header.
>
> I don't know if this is related to his problem or not, but there is
> something in the CGI.pm changelog about Moved:
>
>   Version 3.16 Wed Feb  8 13:29:11 EST 2006
>    1. header() -charset option now works even when the MIME type is not
> "text".
>    2. Fixed documentation for cookie() function and fastCGI.
>    3. Upload filehandles now only closed automatically on Windows systems.
>    4. Apache::Cookie compatibility fix from David Wheeler
>    5. CGI::Carp->fatalsToBrowser() does not work correctly with
>         mod_perl 2. No workaround is known.
>    6. Fixed text status code associated with 302 redirects. Should be
> "Found"
>         but was "Moved".
>    7. Fixed charset in start_html() and header() to be in synch.
>
> Todd
>
>
I have upgraded to CGI.pm 3.25.  Same thing.
Here's the code in modules/http/http_protocol.c:

    switch (status) {
    case HTTP_MOVED_PERMANENTLY:
    case HTTP_MOVED_TEMPORARILY:
    case HTTP_TEMPORARY_REDIRECT:
        return(apr_pstrcat(p,
                           "<p>The document has moved <a href=\"",
                           ap_escape_html(r->pool, location),
                           "\">here</a>.</p>\n",
                           NULL));
    case HTTP_SEE_OTHER:

I've reinstalled 2.0.55 and redirects are working properly.
Perhaps the above is broken in 2.0.55.  I mucked with it a
bit and didn't get anywhere (no surprise).  Thanks for all
suggestions.  I'll take a look at CAP::Redirect.

Thanks,
Jon

P.S.  I wonder if #5 above could be a problem? (Doubt it)



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.