[Mulgara-general] firefox bug and server config

Gregg Reynolds dev at mobileink.com
Fri Sep 4 16:32:41 UTC 2009


On Fri, Sep 4, 2009 at 9:20 AM, Gregg Reynolds <dev at mobileink.com> wrote:

> Hi,
>
> I'm working on a simple web page and javascript for exploring Mulgara.  I
> seem to have run into a firefox bug, whereby a GET transaction is completed
> (readyState == 4) but the status == 0.  I'm sending the get request to a
> vanilla mulgara instance on localhost:8080 that I know works.  In
> LiveHTTPHeaders I can see the request and response, both of which look
> fine.  But the XMLHttpRequest object seems to be discarding the data.  This
> is on OS X 10.5.8, FF 3.5.2.
>
> I've been beating my head on this for about eight hours now and I'm
> completely flummoxed (how I hate software!).  My suspicion however is that
> this might be connected to the new support (
> https://developer.mozilla.org/En/HTTP_access_control) for the CORS<http://dev.w3.org/2006/waf/access-control/>
> standard.  I.e., if the mulgara response were to include the
> "Access-Control-Allow-Origin" header, it might possibly maybe work.  (See it
> in action, with LiveHTTPHeaders on, at
> http://arunranga.com/examples/access-control/simpleXSInvocation.html
> Dunno what else to try at this point.
>
> The problem is I have no idea how to configure Jetty and I'm hoping
> somebody on the list does and is willing to save me the trouble of
> learning.  ;)
>

Ok, I think I've confirmed this.  Jetty configuration terrifies me, so I
installed nginx <http://wiki.nginx.org/Main> , which is very easy to
configure.  With the default config (no CORS headers) serving a static text
page from localhost:8084, I saw the same problem (requesting page served
from Apache at localhost:8088).  So I hardcoded an nginx config line to add
a "Access-Control-Allow-Origin http://localhost"  header to each response,
and voila, worked like a charm.

So if I can get this confirmed on Jetty (and Mulgara) then the default
onfiguration should probably use CORS headers.

Thanks,

gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mulgara.org/pipermail/mulgara-general/attachments/20090904/af9d6a6e/attachment.htm>


More information about the Mulgara-general mailing list