Ticket #3174 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

Better support for file:// urls

Reported by: ahocevar Owned by: tschaub
Priority: minor Milestone: 2.11 Release
Component: Request Version: 2.10
Keywords: Cc:
State: Commit

Description

In OpenLayers.Request, we check for the status code when we decide whether to trigger the "success" event or not. In both Firefox and Safari, AJAX requests to  file:// resources work fine, but this status check keeps them from being processed properly, because the status code for such requests, even when successful, is 0.

This ticket suggests to set the status code to 200 when we encounter a  file:// url and have a responseText.

Attachments

openlayers-3174.patch Download (0.6 KB) - added by ahocevar 2 years ago.

Change History

Changed 2 years ago by ahocevar

Changed 2 years ago by ahocevar

Tests still pass. Thanks for any review.

Changed 2 years ago by bartvde

  • state changed from Review to Commit

Andreas, this looks good to me.

jQuery took a similar approach:  https://github.com/jquery/jquery/commit/cb85da7b62e74e7339ed652ade209aaffbd0c15b/

Changed 2 years ago by ahocevar

  • status changed from new to closed
  • resolution set to fixed

(In [11711]) better support for  file:// resources. r=bartvde (closes #3174)

Note: See TracTickets for help on using tickets.