[
https://issues.jboss.org/browse/JBIDE-14652?page=com.atlassian.jira.plugi...
]
Yahor Radtsevich reassigned JBIDE-14652:
----------------------------------------
Assignee: Ilya Buziuk (was: Yahor Radtsevich)
CordovaSim: cross-origin requests send default user agent string in
headers
---------------------------------------------------------------------------
Key: JBIDE-14652
URL:
https://issues.jboss.org/browse/JBIDE-14652
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Affects Versions: 4.1.0.Beta1
Reporter: Yahor Radtsevich
Assignee: Ilya Buziuk
Fix For: 4.1.0.Beta2
Attachments: ua-actual-result.png
Cross-origin XMLHttpRequest send browser's default User Agent string in the request
headers.
*Steps to reproduce:*
Create the following page in a hybrid project and open it with CordovaSim:
{code:xml|title=ua-test.html}
<script>
var client = new XMLHttpRequest();
client.onreadystatechange = function() {
if(client.readyState == client.DONE) {
if (client.status == 200) {
alert(/<span
id="body_lbUserAgent">([^>]*)<\/span>/ig.exec(client.responseText)[1]);
} else {
alert("Error code: " + client.status);
}
}
}
client.open("GET", "http://www.whatsmyuseragent.com/");
client.send();
</script>
{code}
*Actual result:*
A desktop User Agent is shown:
!ua-actual-result.png|thumbnail!
*Expected result:*
An iPhone User Agent is shown.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira