title: Unable to set status reason in http response header in Restlet Web service
body: <p>I am making a REST web service using restlet framework. I am using the org.restlet 2.3.1 jar</p>
  
  <p>I have to customize the error response header. Depending on specific issue i have to show the response status code and status reason in response header.
  For this i have made a class that extends StatusService and override the toStatus method. I check the throwable and set the status accordingly. Refer sample code below. </p>
  
  <pre><code>@Override
  public Status toStatus(Throwable throwable, Request request,
          Response response) {
      if (throwable != null) {
          return new Status(500,throwable, "DD","DD");
      }
  
      return super.toStatus(throwable, request, response);
  }
  </code></pre>
  
  <p>So whenever exception is thrown from the restlet code it is caught here and the error response is returned. The error response has correct status code that is 500 but the status reason is not correct. Instead of DD it shows Internal Server Error. </p>
  
  <blockquote>
    <p>HTTP/1.1 500 Internal Server Error</p>
  </blockquote>
  
  <p>Is there some but with the restlet framework version i am using.
  Please help.</p>