FWIW, the same problems occur in production mode regardless of whether
deferred binding is used or not.  Today I tried this:

ClientResource r = new ClientResource("/admin/myresource");
        r.setOnResponse(new Uniform() {
            @Override
            public void handle(final Request request, final Response
response) {
                int code = response.getStatus().getCode();
                Series<Parameter> responseHeaders = (Series<Parameter>)
response.getAttributes().get(
                        HeaderConstants.ATTRIBUTE_HEADERS);
                String description = response.getStatus().getDescription();
                Log.info("status = " + Integer.toString(code) + " " +
description + ", response headers="
                        + responseHeaders);

            }
        });
        r.get();

The logged output is:

(-:-) 2011-12-12 09:48:05,543 [INFO ] status = 0 , response headers=[]

Whereas the actual response from the server is:

HTTP/1.1 302 Found
Location:
https://www.google.com/accounts/ServiceLogin?service=ah&passive=true&continue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttp://myapp.appspot.com/admin/myresource&ltmpl=gm&shdf=ChULEgZhaG5hbWUaCU5ld3NWYWxldAwSAmFoIhQ55YDUxeULotaopSSGkttbXc4_JygBMhQr1oM6w5XVX4FaU-49ckQ_X3AH0Q
Date: Mon, 12 Dec 2011 14:48:06 GMT
Content-Type: text/html
Server: Google Frontend
Content-Length: 0

--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/accessing-response-Status-from-GWT-client-code-works-in-hosted-mode-but-not-production-tp7083856p7086354.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892525

Reply via email to