DescriptionReturning a HTTP 302 is impractical for APIs when called via JavaScript.
The XMLHttpRequest specification requires that redirects are handled by
XMLHttpRequest object and therefore are not seen by the script that
called an URL that returns a 302. See http://www.w3.org/TR/2014/WD-XMLHttpRequest-20140130/#infrastructure-for-the-send()-method
I've changed the NeedsLogin exception to return HTTP 401 with the
login URL in payload and a hint in the WWW-Authenticate header which
is required by the HTTP specification for this status code.
Patch Set 1 #
Total comments: 2
MessagesTotal messages: 3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||