This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
completeRequest issue in 1.2.0rc3 #4587
Comments
I have the same issue. All http requests that response with text get the status code converted to 200. status = (protocol == 'file') ? (response ? 200 : 404) : status; So if I return 500 with text explain the problem the status code converted to 200 and the success callback is executed. |
related #4436 |
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
…file:// apps Previously if an app was running from file:// origin we would always return either http 200 or 404 depending on whether the response was present. This changes the behavior so that we do this only if the protocol of the request (not the origin) is file:// and only if the status code is 0. Closes angular#4436 Closes angular#4587 Closes angular#4514
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
…file:// apps Previously if an app was running from file:// origin we would always return either http 200 or 404 depending on whether the response was present. This changes the behavior so that we do this only if the protocol of the request (not the origin) is file:// and only if the status code is 0. Closes angular#4436 Closes angular#4587 Closes angular#4514
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Between rc2 and rc3, the assignment of the "protocol" variable in the completeRequest function (line 7090) has flipped the order for where it tries to find a protocol. Previously (in rc2 and prior), it was first checking the actual request for the protocol before trying to get it from locationProtocol, now in RC3 it reads:
This happened to break compatibility for me in PhoneGap/Cordova - the code making the call is stored locally, with the file:// protocol, while the site I'm making requests to is on an http:// protocol. (NOTE: I know this is technically an XSS - PhoneGap has its own domain whitelisting system for preventing this from being a security hole)
The text was updated successfully, but these errors were encountered: