Ticket #1638 (closed feature: fixed)

Opened 5 years ago

Last modified 5 years ago

New XmlHttpRequest framework uses different metric for success

Reported by: crschmidt Owned by: crschmidt
Priority: critical Milestone: 2.7 Release
Component: Request Version: 2.6
Keywords: Cc:
State: Complete

Description

In Ajax.Request, we had:

return !status (status >=200 && status < 300);

as a metric for a 'successful' request.

Now, we have:

request.status >= 200 && request.status < 300

Tim's response to this was 'Don't depend on the framework to declare success'. If that's going to be the answer, that's fine: We should drop success/failure calls from the framework, and change all the OpenLayers code that uses them to instead do its own parsing of success/failure. The other option (in my opinion) is to make the success metric the same as it used to be -- which is less code, and fixes what is a regression from the current library to the previous library (in my opinion).

Attachments

t1638.patch Download (2.2 KB) - added by tschaub 5 years ago.
allow for no status on requests

Change History

Changed 5 years ago by tschaub

allow for no status on requests

Changed 5 years ago by tschaub

  • owner changed from tschaub to crschmidt
  • state set to Review

Passes Firefox 2 and IE 7.

Changed 5 years ago by tschaub

  • component changed from general to Request

Changed 5 years ago by crschmidt

  • state changed from Review to Commit

Changed 5 years ago by tschaub

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [7609]) The Request functions now consider a request with null status as a sucessful request. This is relevant for the file 'protocol' where xhr status is never set. r=crschmidt (closes #1638)

Note: See TracTickets for help on using tickets.