[Dancer-users] redirect in post route appears to fail

Joel Roth joelz at pobox.com
Sat Dec 4 03:16:52 CET 2010


Hi again,

Stumbling web newbie seeks scarred veteran for guidance.
(Failing which he is considering some self-scarring.)

I just install 1.2001 from CPAN.

Here are my routes:

   get  '/redirect' => sub { redirect '/welcome'         };
   post '/login'    => sub { redirect '/welcome'         };
   get  '/login'    => sub { render_as_markdown('login') };
   
And here are the results I get:

   http://host/redirect -> welcome page
   http://host/login    -> login page with CGI form
   Submit login form    -> login page with params in URL

I would expect the pressing 'Submit' to trigger the 'post'
route and redirect to 'welcome'. Can anyone suggest how I
might get that behavior? Or what I may be misunderstanding.

More details....

The login page has a form:

   <form>
   
   Username: <input type="text" name="user" /><br />
   
   Password: <input type="password" name="pass" /><br />
   
   <input type="submit" value="Submit" />
   
   </form> 
   
The full HTML source to the login page is here:

   http://pastebin.com/e7QQJ4vw

I think there may be something *else* wrong.
The app doesn't produce any logs (even from a die)
although development.log appears in lsof output for the
process.

Thanks,

Joel

-- 
Joel Roth


More information about the Dancer-users mailing list