Well, I compared HttpServerConverter#commit code in restlet 1.0.10 and restlet 
1.1.1, and the 1.0.10 version did not check for content length or response code 
before adding the headers. Surely this needs to be fixed in restlet 1.1.1.

HttpServerConverter#commit code in restlet 1.0.10  was as follows:

    public void commit(HttpResponse response) {
        try {
            // Add the response headers
            addResponseHeaders(response);

            // Send the response to the client
            response.getHttpCall().sendResponse(response);
        } catch (Exception e) {
            getLogger().log(Level.INFO, "Exception intercepted", e);
            
response.getHttpCall().setStatusCode(Status.SERVER_ERROR_INTERNAL.getCode());
            response.getHttpCall().setReasonPhrase(
                    "An unexpected exception occured");
        }
    }

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

Reply via email to