Firefox does not preserve custom headers during Ajax request redirect: an ASP.NET MVC solution

后端 未结 1 1037
逝去的感伤
逝去的感伤 2020-12-06 07:19

I use ajaxForm with jQuery, and there\'s one problem with Firefox - for some reason it does not preserve X-Requested-With custom header (which is used to detect

相关标签:
1条回答
  • 2020-12-06 08:02

    Just in case somebody else stumbles on this question after wondering why their header-based dispatching fails in Firefox, this is not fixed as of 2010-10-11, tested in Firefox 3.6.10

    https://bugzilla.mozilla.org/show_bug.cgi?id=553888 is the corresponding bug, and from the latest comments as of today (by Jonas, made on 2010-09-16) this issue will not be fixed in Firefox 4.

    Furthermore, this bug seems to extend to standard settable headers such as Accept, meaning an Accept: application/json will disappear after a redirect and your xhr engine will very likely get an HTML response instead.

    0 讨论(0)
提交回复
热议问题