|
From: Thomas T. C. <ttc...@gm...> - 2008-04-07 15:45:27
|
Hello,
A couple of days ago I ran into a problem with throwing WebApplication
examples with a response object:
throw new WebApplicationException(Response.status(412)
.type("text/plain;charset=utf-8")
.entity("Something
went wrong").build());
Throwing this exception would give a text/plain body with the entity body
but with http code 200. Throwing the same exception without an entity would
give the expected (412 response with an empty body).
After a little code browsing I found the problem in Dispatcher.java invoke
method. I created a patch file from revision 133 attached to this email.
Regards,
Thomas Cremers
|