> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To post to this group, send email to mojol...@googlegroups.com.
> To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
>
More information about what those controller do would help more.
You wrote (quote repaired):
>>>>> How I can transfer control in other controller with some
>>>>> parametres?
>>>> There is no internal redirect support in Mojolicious.
>>
>>> Can I use redirect_to for this? How?
>>
>> redirect_to is for external redirection. It will send 302 response
>> to the browser with a Location header pointing to the, hm, new
>> location!
> And I can transfer parametres with the redirect_to?
To transfer parameters over an external redirect, you may want to use
the flash.
<http://github.com/kraih/mojo/blob/master/lib/MojoX/Session/Cookie/Controller.pm#L99
>
HTH
memowe
--
Schmeddingstrasse 123 g, 48149 Muenster, <http://www.memowe.de/>
E-Mail: <ma...@memowe.de>, OpenPGP-Key-ID: 0x730E195D
Key fingerprint: 55A8 9646 9B58 60AC B5BC 9661 FDD4 93C0 730E 195D
E-Mails von mir sind signiert. Unsignierte E-Mails sind nicht von mir.
There is no internal redirect support in Mojolicious.
--
Sebastian Riedel
http://labs.kraih.com
http://mojolicious.org
http://twitter.com/kraih
http://github.com/kraih/mojo/blob/master/lib/Mojolicious/Lite.pm#L525
In the application layer, which is where mojo works, no.
In mod_perl, the authentication layers of the request as it passes
thru apache can be intercepted, and at those points it is useful to
redirect to a different place, ie, display the login form. This is
the *only* situation in over 13 years of doing this that I can think
of.
The big problem here is that it breaks REST.
Lets say the user enters via "/show/picture/23", your auth layer notices that the session expired and the user needs to login again.
In your example you would redirect internally to "/login", a whole different endpoint, REST broken.
IMO what should have happened in a modern clean app is a 302 response redirecting the user externally to "/login".
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To post to this group, send email to mojol...@googlegroups.com.
To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
The mod_perl login modules are what I'd call "prehistoric".
I don't think I like that model now, and in fact we are migrating away
from that in our own services to external redirects to proper login
pages as you recommend too.
I *thought* I was bolstering your argument against internal redirects
but I guess I wasn't totally clear :-)