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
Joel Roth wrote:
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>
Add method="post" above... so, it would read <form method="post">
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:
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
On Fri, Dec 03, 2010 at 08:21:30PM -0600, Puneet Kishor wrote:
Add method="post" above... so, it would read
<form method="post">
Thanks! I'll save the scarring ritual for another time. :-) -- Joel Roth -- Joel Roth
participants (2)
-
Joel Roth -
Puneet Kishor