[
https://issues.apache.org/jira/browse/CB-5211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14068415#comment-14068415
]
Sergey Grebnov commented on CB-5211:
------------------------------------
Can't repro the issue
1. No crash
2. Timeout parameter is supported
The following code gives me the following output
{code}
Received Event: deviceready
error: timeout
{code}
{code}
onDeviceReady: function() {
app.receivedEvent('deviceready');
var uri = "http://" + "10.0.8.254" + ":" + "8080" +
'/requests/status.xml?tc=' + Date.now();
$.ajax({
url: uri,
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa('user' + ":"
+ '123'));
},
dataType: "xml",
timeout: 5000,
success: function (data, status, jqXHR) {
console.log('success');
},
error: function (jqXHR, textStatus, errorThrown) {
console.log('error: ' + errorThrown);
}
});
}
{code}
> Windows Phone 8 crashes if ajax-request with basic authentication is send
> with wrong credentials
> ------------------------------------------------------------------------------------------------
>
> Key: CB-5211
> URL: https://issues.apache.org/jira/browse/CB-5211
> Project: Apache Cordova
> Issue Type: Bug
> Components: WP8
> Affects Versions: 3.1.0
> Environment: Cordova 3.1
> Microsoft Visual Studio 2012 Express
> Created on Windows 8.1
> Tested on Samsung Ativ S
> VLC 2.1 HTTP-Interface with basic authentication
> Reporter: stiller-leser
> Assignee: Sergey Grebnov
>
> Hey,
> I am currently writing an app for the VLC-Mediaplayer. Since version 2.1 they
> request a password to be set to access their webinterface. I am connecting to
> and controlling the webinterface via ajax-calls. To connect to the server I
> need to send a authorization-header with the credentials. As long as the
> credentials are correct, even if the username-part is empty, the app works
> like charm.
> As soon as the request is send with the wrong credentials the app is crashing
> on Windows Phone 8 (Samsung Ativ S). It won't reopen until it is manually
> killed from VS.
> First I thought, ok, that might be a jquery-problem. Today I tried the same
> thing with a standard javascript-xmlHttpRequest. The same problem occurs.
> On Android and in Chrome (using ripple), the timeout is correctly called,
> e.g. handled.
> You'll find my ajax-calls here: http://pastebin.com/9kDansAC. Let me now if
> you need any further informations.
> Cheers,
> stiller-leser
> P.S. Labels newbie and noob - Seriously? :)
--
This message was sent by Atlassian JIRA
(v6.2#6252)