[ https://issues.apache.org/jira/browse/CB-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999128#comment-14999128
]
Tobias Bocanegra commented on CB-2415:
--------------------------------------
The problem occurs, if an ajax request responds with a 401. normally a browser would open
the basic-auth dialog, but uiwebview just hangs.
If you can control the server, you could respond with a 403, if you detect an ajax request
(x-requested-with header) and a browser user-agent.
The other possibility is to implement our own URLProtocol for http/https and suppress NSURLSessionAuthChallengeUseCredential
to be forwarded to the webview. As it is not so 'fun' to implement all the http/https handling,
especially when it comes to caching, I would only enable this if required, eg via a preference.
alternatively, we could provide the custom protocol via plugin.
question:
a) should we provide such a custom URLProtocol that fixes this bug as part of cordovalib?
b) should we provide such a custom URLProtocol that fixes this bug as part of a plugin?
> On iOS the ajax error/fail callback is not called after server returns error code 401/unauthorized
> --------------------------------------------------------------------------------------------------
>
> Key: CB-2415
> URL: https://issues.apache.org/jira/browse/CB-2415
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 2.2.0
> Environment: OSX 10.8.2, Xcode 4.5.1, iOS Simulator 5.0, 5.1, 6.0, cordova 2.2
> Reporter: Zach White
> Assignee: Tobias Bocanegra
> Labels: 401, BasicAuth, core
>
> I am seeing the same issue as reported in [CB-2284|https://issues.apache.org/jira/browse/CB-2284]
also in iOS. Ajax calls with Authorization header set are not returning but are timing out
when the authorization credentials are invalid.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
|