[jbosstools-issues] [JBoss JIRA] (JBIDE-14652) CordovaSim: cross-origin requests send default user agent string in headers

Yahor Radtsevich (JIRA) jira-events at lists.jboss.org
Mon May 27 08:16:07 EDT 2013


     [ https://issues.jboss.org/browse/JBIDE-14652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yahor Radtsevich updated JBIDE-14652:
-------------------------------------

    Attachment: ua-actual-result.png

    
> 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: Yahor Radtsevich
>             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.
> A page to test with (create it in a hybrid project):
> {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:*
> !ua-actual-result.png|thumbnail!

--
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


More information about the jbosstools-issues mailing list