<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Please file a JIRA for this at&nbsp;<a href="https://issues.jboss.org/browse/AGJS">https://issues.jboss.org/browse/AGJS</a><div><br><div><div>On Jun 18, 2013, at 9:36 AM, Apostolos Emmanouilidis &lt;<a href="mailto:aemmanou@redhat.com">aemmanou@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">


  <meta http-equiv="Content-Type" content="text/html; CHARSET=UTF-8">
  <meta name="GENERATOR" content="GtkHTML/4.6.4">

<div>
Hi,<br>
<br>
I'm testing the CORS support on Aerogear.js.<br>
<br>
Initially, I executed some CORS tests from Mozilla Firefox v21.0 and received the Error: <i>"jqXHR.getResponseHeader(..) is null aerogear.js line 605</i>" when testing the weblinking (attached screenshot).<br>
<br>
However, I think that this error is not related to the AeroGear.js. <br>
<br>
I managed to overcome this issue in Firefox by adding an extra header to the service response which sets a server whitelist headers that browsers are allowed to access:<br>
<blockquote>
    Access-Control-Expose-Headers: Link<br>
</blockquote>
<br>
The problem is that it still fails on the Android emulator browser.<br>
<br>
The header tests were also failing in Firefox and passed after adding the following header in the Response headers:<br>
<blockquote>
    Access-Control-Expose-Headers: next,previous<br>
    <br>
</blockquote>
But on the Android emulator the header tests are failing. I captured the requests using a proxy between the emulator and the REST service and found that the constructed URLs for next and previous calls are wrong. This happens because the custom response headers cannot be read.<br>
<br>
In conclusion, I think that the Access-Control-Expose-Headers header is not supported by the Android browser and for that reason the CORS tests are failing. There is a relevant open issue [2] in the Android project.<br>
<br>
[1]: <a href="http://api.jquery.com/jQuery.ajax/">http://api.jquery.com/jQuery.ajax/</a><br>
[2]: <a href="http://code.google.com/p/android/issues/detail?id=56726">http://code.google.com/p/android/issues/detail?id=56726</a>
</div>

<span>&lt;CORS_AeroGear-js.png&gt;</span>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></body></html>