Re: ErrorDocument from a registry script

2010-02-09 Thread Mark Stosberg
I revisited the issue of 404 handling in CGI and Apache::Registry today and here's what I found. For illustration, here's a minimal CGI script which can illustrate the issue: #!/usr/bin/perl print "Status: 404\r\nContent-Type: text/html\r\n\r\nHello"; You can review the status codes being ret

Re: ErrorDocument from a registry script

2009-05-07 Thread Michael Peters
Perrin Harkins wrote: Really? It looks to me like he never got it working. He said: If I just set "status => 404" with CGI.pm / Apache::Registry and return nothing, it works the first time, and then after that I get a lot of these errors And further on in the conversation it seemed li

Re: ErrorDocument from a registry script

2009-05-07 Thread Perrin Harkins
On Thu, May 7, 2009 at 2:51 PM, Michael Peters wrote: > Looking at this email thread > (http://perl.markmail.org/message/yimclxzgspjtibbn?q=Apache::Registry+404+ErrorDocument#query:Apache%3A%3ARegistry > 404 ErrorDocument+page:1+mid:xtfrl2hywqugoqlh+state:results) it seems that > it worked (mostly

Re: ErrorDocument from a registry script

2009-05-07 Thread Michael Peters
Adam Prime wrote: I don't have a mod_perl 1.3 setup handy, but i was able to get it to do what you're wanting to do just fine in mod_perl 2 requesting the script results in me seeing the error document found at /404.html Maybe it's a mod_perl 1.3 limitation. I do get Apache's internal 404 d

Re: ErrorDocument from a registry script

2009-05-07 Thread Michael Peters
Perrin Harkins wrote: You also need to return the correct code from the handler. This is not simple to do from Registry. Have a quick look at the list archives for things related to Registry and 304/404 handling. Apache::RedirectLogFix might be the ticket for you. I'd rather not have to go

Re: ErrorDocument from a registry script

2009-05-07 Thread Adam Prime
Michael Peters wrote: Michael A. Capone wrote: In the spirit of checking off the obvious things... are you sure that the ErrorDocument directive is working for other pages? in other words, can you open a browser and goto http://mydomain.com/this_file_does_not_exist.htm and see your ErrorDocu

Re: ErrorDocument from a registry script

2009-05-07 Thread Perrin Harkins
On Thu, May 7, 2009 at 11:13 AM, Michael Peters wrote: > I have a registry script that could return a NOT FOUND (404) error. I'm > handling that like so: > >  Apache->request->status(NOT_FOUND); You also need to return the correct code from the handler. This is not simple to do from Registry. H

Re: ErrorDocument from a registry script

2009-05-07 Thread Michael Peters
Michael A. Capone wrote: In the spirit of checking off the obvious things... are you sure that the ErrorDocument directive is working for other pages? in other words, can you open a browser and goto http://mydomain.com/this_file_does_not_exist.htm and see your ErrorDocument?\ Yes, that's ho

Re: ErrorDocument from a registry script

2009-05-07 Thread Michael A. Capone
In the spirit of checking off the obvious things... are you sure that the ErrorDocument directive is working for other pages? in other words, can you open a browser and goto http://mydomain.com/this_file_does_not_exist.htm and see your ErrorDocument? Michael Peters wrote: I'm pretty sure this