Hi!

I'm using Dancer 1.3093 (latest in ActiveState PPM) under Windows.
I have created application using "dancer -a test" command, and modified test/lib/test.pm so now it looks like this:

--beginning of code--
# This is application generated by "dancer -a test", only test/lib/test.pm was modified
package test;
use Dancer ':syntax';
use Exception::Class (
    foobar => {
        description => 'Arguments passed to function are invalid.'
    },
);

our $VERSION = '0.1';

get '/' => sub {
    <<EOF;
<!doctype html>
<html>
<head><title>test</title></head>
<body>
        <form action="/" method="post">
                <input type="text" name="login"><br>
                <input type="password" name="password"><br>
                <input type="submit" name="submit">
        </form>
</body>
EOF

};

post '/' => sub {
    die 'error!';
};

true;
---end of code---


When I run app.pl with argument "--environment=production", connect to the site with browser, and click "submit", Dancer returns error 500 (as expected), but instead of "text/html" Content-Type, it has "application/x-www-form-urlencoded" MIME type.

What am I doing wrong?

Thanks,
Tomasz
_______________________________________________
Dancer-users mailing list
[email protected]
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users

Reply via email to