Dancer
Dancer copied to clipboard
Dancer::Plugin::Ajax affects routes that dont use the `ajax` keyword
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.
+1
Very good point. Could you open a bug against Dancer 2 for this? Thanks!
2013/1/3 Kev Zettler [email protected]
+1
— Reply to this email directly or view it on GitHubhttps://github.com/PerlDancer/Dancer/issues/879#issuecomment-11832787.
Oh wait, I got puzzled by the GH email, I'll fork the issue.