[Catalyst] Re: Redirects // Re: forwarding to chained actions

2007-04-27 Thread A. Pagaltzis
* Simon Wilcox [EMAIL PROTECTED] [2007-04-27 15:10]: So, what do people do - do you send 303/307's correctly or just default to 302 behaviour? I send 303, unless the HTTP request uses HTTP 1.0, in which case the client sees a 302 instead. Regards, -- Aristotle Pagaltzis //

[Catalyst] Re: Redirects // Re: forwarding to chained actions

2007-04-27 Thread A. Pagaltzis
* Bill Moseley [EMAIL PROTECTED] [2007-04-27 20:55]: sub post_redirect { my ( $c, $location ) = @_; my ($version) = $c-request-protocol =~ m/(\d+\.\d+)/; # Make location absolute $location = $c-uri_for( $location ) unless $location =~ /http/; $c-res-redirect(

Re: [Catalyst] Re: Redirects // Re: forwarding to chained actions

2007-04-27 Thread Bill Moseley
On Fri, Apr 27, 2007 at 10:30:01PM +0200, A. Pagaltzis wrote: Various nitpickery corrected: sub post_redirect { my ( $c, $loc ) = @_; my $is_rel_uri = $loc !~ m{ :// }x; my $is_old_proto = do { my $p = $c-request-protocol; my ( $maj,