Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] toString() in org.eclipse.jetty.server.Response class

Am 27.08.2013 15:34, schrieb Yana Begun (ybegun):

> For debug printing we are using org.eclipse.jetty.server.Response.toString() function:
[...]
>         _connection.getResponseFields().toString();
[...]
> Response fields are printing in the loop with “\r\n” for each field.
> Server is running on UNIX and “\r” is not looking good.
> 
> Is it any way to avoid this?

Response-lines have to be seperated by \r\n according to the RFC.
You can do a
toString().replaceAll("\\r\\n", System.getProperty("line.separator"))
to replace that by the system line break.


Regards, Lothar


Back to the top