Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Dancer::Plugin::Ajax affects routes that dont use the `ajax` keyword #879

throughnothing opened this Issue Jan 3, 2013 · 3 comments


None yet
3 participants

throughnothing commented Jan 3, 2013

Because of the before hook it uses, it can alter the content_type response of even normal routes.

I ran across this issue when trying to get the raw html of one of my routes with a jQuery ajax request. The jQuery request was never having its success event fired, because the before hook in the Ajax plugin was detecting it as an ajax request and setting the content-type to text/xml instead of text/html as it should have.

I don't think this plugin should alter routes in this way unless they are routes created using the ajax keyword.



sukria commented Jan 3, 2013

Very good point. Could you open a bug against Dancer 2 for this? Thanks!

2013/1/3 Kev Zettler notifications@github.com


Reply to this email directly or view it on GitHubhttps://github.com/PerlDancer/Dancer/issues/879#issuecomment-11832787.


sukria commented Jan 3, 2013

Oh wait, I got puzzled by the GH email, I'll fork the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment