Google Closure — XhrIO: getting URL of redirection -
i'm using google closure's xhrio facilities send post request url. when response request 302 redirect, i'd redirect user's browser url being redirected to.
i've tried calling getlasturi
on object passed callback, returns uri of request, rather of subsequent redirection. getstatus
returns 200. know request being redirected, because can see in chrome's network request viewer.
the temporary redirect (302) handled browser, , javascript never gets see it.
we had similar problem, , solved modifying server side code send 401 instead of 302 on encountering header (x-http-method-override) have explicitly set in request. server response can include redirection url in response (along 401 status).
this stackoverflow question illustrates server side changes: "cannot handle 302 redirect in ajax , why?"
Comments
Post a Comment