mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-13 02:08:55 +00:00
Fix incorrect _isLocalFileConnection if a locally called web application calls a remote server.
If a locally called web application (called with file://foo/index.html) is doing a http get request call using "http://whatever/", we receive a connection:didReceiveResponse: of response type CPURLResponse instead CPHTTPURLResponse as expected.
This commit is contained in:
1 parent
b04dbb647b
commit
9b017de39c
1 file changed
+2
-6
@@ -151,12 +151,8 @@ var CPURLConnectionDelegate = nil;
|
||||
var URL = [_request URL],
|
||||
scheme = [URL scheme];
|
||||
|
||||
// Browsers use "file:", Titanium uses "app:"
|
||||
_isLocalFileConnection = scheme === "file" ||
|
||||
((scheme === "http" || scheme === "https:") &&
|
||||
window.location &&
|
||||
(window.location.protocol === "file:" || window.location.protocol === "app:"));
|
||||
|
||||
// Browsers use "file:"
|
||||
_isLocalFileConnection = scheme === "file";
|
||||
_HTTPRequest = new CFHTTPRequest();
|
||||
|
||||
if (shouldStartImmediately)
|
||||
|
||||
Reference in new issue
Block a user