[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    [Mason] Redirect within a Subrequest?
From:       David Marshall <dmarshall () gmail ! com>
Date:       2005-04-14 2:42:37
Message-ID: 53f1586305041319423ef1bb7 () mail ! gmail ! com
[Download RAW message or body]

Hi all,

I'm running into a tricky problem for which I'm hoping there's a
straight-forward solution.

We have a dhandler that munges the URI and does a subexec to some
other component.

Sometimes one of these other components needs to issue a redirect.

However, a request that goes through the dhandler's subexec always
returns a status of 200 and not 302.

Any ideas on how to do this correctly?

Example:

$ cat bar.html
<%flags>
        inherit => undef
</%flags>

I am bar.html

$ cat foo.html
% $m->redirect('/mason/bar.html');

$ cat baz.html
<%flags>
        inherit => undef
</%flags>

% $m->subexec('foo.html');


$ GET -S http://blah.com/mason/bar.html
GET http://blah.com/mason/bar.html --> 200 OK

I am bar.html

### as expected

$ GET -S http://blah.com/mason/foo.html
GET http://blah.com/mason/foo.html --> 302 Found
GET http://blah.com/mason/bar.html --> 200 OK

I am bar.html

### as expected

$ GET -S http://blah.com/mason/baz.html
GET http://blah.com/mason/baz.html --> 200 OK

### not as expected


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&opĚk
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic