Hi.

I'm testing the http request builder in hosted mode, trying to access
a server that is down or beyond SOP.

When I access a server which is actually down (ie http://localhost:9999),
or one that is beyond SOP (ie http://www.example.com),
onResponseReceived is fired, and response.getStatusCode() returns 0.

It works as expected in firefox: an exception is thrown and no
onResponseReceived nor onError are fired.

Is this the expected behaviour?

As a side note: I'm doing this on mac, I tried it before on windows
and I'm pretty sure it was working as expected.

Thanks.

Source code:

public class Test_same_origin_policy implements EntryPoint {
        public void onModuleLoad() {
                final String url = "http://www.example.com/";;
                RequestBuilder builder = new RequestBuilder(RequestBuilder.POST,
URL.encode(url));

                try {

                        builder.sendRequest(null, new RequestCallback() {

                        public void onError(Request request, Throwable 
exception) {

                        }

                       public void onResponseReceived(Request request,
Response response) {

                        }
                  });
                }
                catch (RequestException e) {
                }
        }
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to