[aerogear-dev] Aerogear.js CORS & Android browser

Kris Borchers kris at redhat.com
Tue Jun 18 10:59:16 EDT 2013


Please file a JIRA for this at https://issues.jboss.org/browse/AGJS

On Jun 18, 2013, at 9:36 AM, Apostolos Emmanouilidis <aemmanou at redhat.com> wrote:

> Hi,
> 
> I'm testing the CORS support on Aerogear.js.
> 
> Initially, I executed some CORS tests from Mozilla Firefox v21.0 and received the Error: "jqXHR.getResponseHeader(..) is null aerogear.js line 605" when testing the weblinking (attached screenshot).
> 
> However, I think that this error is not related to the AeroGear.js. 
> 
> 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:
> Access-Control-Expose-Headers: Link
> 
> The problem is that it still fails on the Android emulator browser.
> 
> The header tests were also failing in Firefox and passed after adding the following header in the Response headers:
> Access-Control-Expose-Headers: next,previous
> 
> 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.
> 
> 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.
> 
> [1]: http://api.jquery.com/jQuery.ajax/
> [2]: http://code.google.com/p/android/issues/detail?id=56726
> <CORS_AeroGear-js.png>_______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130618/0803d54c/attachment.html 


More information about the aerogear-dev mailing list