#719 bug

Synchronous XHR call on Safari changes 401 response to 404

Reported by sandro | June 22nd, 2009 @ 11:57 PM

Synchronous XHR call to a resource which returns a HTTP response code of 401. Safari 4.0 (and I believe earlier versions, though untested) will report xmlhttpobject.status == 404.

This does not happen on asynchronous calls.

Safari also seems to destroy all response headers (getAllResponseHeaders() is empty).

Notable: Chrome does not suffer from this bug. The hope is that it has been fixed in webkit.


  new Ajax.Request('authenticate/', {
    method: 'get',
    asynchronous: false,
    onComplete: function(transport) {
      // will get 404 in safari; should be 401
      console.log("prototype response status is " + transport.status);

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket