Hi Michael,

The problem is that the Servlet API has deprecated this setStatus(int,
String) method and recommends using either setStatus(int) or sendError(int,
String).

Therefore, going through the Servlet extension or the Jetty extension
doesn't allow us to safely set the reason phrase, unless the status is an
error. Maybe there is room for improvement in the JettyCall class, but I
think this is a limitation we have to cope with.

Best regards,
Jerome


2010/6/7 Michael Rehse <[email protected]>

> Using Restlet 1.1.10 and the Jetty connector (com.noelios.restlet.ext.jetty
> 1.1.10) deployed as a standalone application, if I set the status to "200
> Foo" the response comes back as "200 OK".
>
> This is not the expected behavior - is it?
>
> I have found the location of the problem - in the
> com.noelios.restlet.ext.jetty.JettyCall class, sendResponse method, the
> else
> reads:
>
> getConnection().getResponse().setStatus(getStatusCode());
>
> It should read:
>
> getConnection().getResponse().setStatus(getStatusCode(),
> getReasonPhrase());
>
> Should I open an issue for this?
> --
> View this message in context:
> http://restlet-discuss.1400322.n2.nabble.com/Unable-to-set-Reason-Phrase-on-successful-request-using-Jetty-tp5149332p5149332.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2618021
>

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

Reply via email to