Re: CGIHandler Changes
"Jonathan Swartz" <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
Ok, I'm trying to test this change and I can't even get CGIHandler to work. :) Here's the relevant httpd.conf portion: ScriptAlias /cgi-bin/ /home/swartz/servers/cgi_redirect/cgi-bin/ DocumentRoot /home/swartz/servers/cgi_redirect/comps Action html-mason /cgi-bin/mason_handler.cgi <LocationMatch "\.html$"> SetHandler html-mason </LocationMatch> When I go to any URL ending in .html, whether the file exists or not, I get the infinite redirect thing: You don't have permission to access /cgi-bin/mason_handler.cgi/cgi-bin/mason_handler.cgi/cgi-bin/mason_handler.c gi/cgi-bin/mason_handler.cgi/cgi-bin/mason_handler.cgi/cgi-bin/mason_handler .cgi/cgi-bin/mason_handler.cgi/cgi-bin/mason_handler.cgi/cgi-bin/mason_handl er.cgi/cgi-bin/mason_handler.cgi... This was addressed in http://marc.theaimsgroup.com/?l=mason&m=105856677015077&w=2, but Dave's solution doesn't seem to apply to me. I'm not going to a /cgi-bin URL explicitly and cgi-bin isn't in the component root. I'm sure I'm doing something stupid. Help? J ----- Original Message ----- From: "David Wheeler" <[email protected]> To: "Mason Developers" <[email protected]> Sent: Monday, December 22, 2003 6:12 PM Subject: Re: [Mason-devel] CGIHandler Changes > On Dec 22, 2003, at 6:04 PM, David Wheeler wrote: > > > * More importantly, it seems like the out_method is never executed if > > a request aborts -- such as on a redirect. Or at least, it doesn't > > execute if nothing is output before the abort. Thus the headers are > > never sent! Or something like that. I just tried to write a test for > > 14-cgi.t, and it output the headers. Maybe it's because > > MasonX::Interp::WithCallbacks aborts before it execs the request? > > Anyway, I'm not sure what the issue is, but it worked fine with Mason > > 1.24. > > Oh, I realize why now. I'm installing my own out_method. It was a > simple scalar, but as of 1.25, that doesn't work because the custom > out_method CGIHandler now only sends headers in its own handler. > However, when I create a new custom handler that sends headers myself, > like this: > > my $out_method = sub { > HTML::Mason::Request->instance->cgi_request->send_http_header > unless $sent_headers; > $sent_headers = 1; > $outbuf .= join '', @_; > }; > > It still doesn't send the headers if I redirect. Is there some other > way we can get CGIHandler to send the headers? > > Thanks, > > > David > > -- > David Wheeler AIM: dwTheory > [email protected] ICQ: 15726394 > http://www.kineticode.com/ Yahoo!: dew7e > Jabber: [email protected] > Kineticode. Setting knowledge in motion.[sm] > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Mason-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mason-devel > ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click