Open throughnothing opened 11 years ago
+1
Very good point. Could you open a bug against Dancer 2 for this? Thanks!
2013/1/3 Kev Zettler notifications@github.com
+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.
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 theAjax
plugin was detecting it as an ajax request and setting the content-type totext/xml
instead oftext/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.