Hi Frank,

the HTTP status line allows only one line. See e.g. 
http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Server_response 
. This is not a Restlet restriction, this is a HTTP restriction.

best regards
    Stephan

Am 10.11.2010 21:52, schrieb [email protected]:
> Hi All,
>
> I am trying to use setStatus with a newline in the description. This is a 
> snipper of the server code with the error:
>
> public String acceptGet(String in) throws Exception {
>      Status SERVER_ERROR_INTERNAL = new Status(530);  
>      getResponse().setStatus(SERVER_ERROR_INTERNAL, "This is 
> Get\nis\n\nBroken");
>
>      return "Get\nIs\nBroken\n";
> }
>
>
> This is the if statement in my client code example that is catching the 500 
> error:
>
> if (conn.getResponseCode() != 200) {
>      System.out.println(conn.getResponseCode());
>      System.out.println(conn.getResponseMessage());
>      System.exit(0);
> }
>
> When I point my client to the url this is the message I get:
> 530
> This is Get
>
> Everything after first newline gets chopped off.  Is it possible to have a 
> newline inside of the status description or was it designed purposely to only 
> allow 1 line?
>
> Thanks,
> Frank
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2680823

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

Reply via email to