Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

iOS - XMLHttpRequest.open basic auth fails - need cross-platform alternative #3

Open
shazron opened this issue Jul 29, 2011 · 1 comment

Comments

@shazron
Copy link
Contributor

shazron commented Jul 29, 2011

See: https://github.com/filmaj/Hydra/blob/master/js/hydra.js#L40

The last two parameters to open take in basic auth credentials, but this fails under iOS. What works under iOS is putting the basic auth credentials into the URL itself.
e.g
http://username:password@foo.com/bar/baz

What needs to be tested is if both Android and Blackberry can use this method as well, if they can, we should change to that method. If they can't, we need to branch to iOS specific code (yuck).

Other notes:
Initially Fil sent the Authorization header in Android, but this fails in BB, but xhr.open basic auth method works in both Android and BB.

@shazron
Copy link
Contributor Author

shazron commented Aug 2, 2011

Have a temporary fix in my fork: https://github.com/shazron/Hydra/blob/iOS-plugins/js/hydra.js#L35-67

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant