Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: HTTP
-
Labels:None
-
Number of attachments :
Description
I need to send some custom error messages to the client using Jetty. I saw in the code that setResponse message adds a underscore for each blank space entered in the custom message.
Is there any workaround for this or can it betaken care of as I don't want my custom messages to be modified by library in anyway as they are parsed by the client.
Code snippet from AbstractGenerator.java.
public void setResponse(int status, String reason)
{
if (_state Unable to render embedded object: File (= STATE_HEADER) throw new IllegalStateException("STATE) not found.=START");
_status = status;
if (reason!=null)
{
int len=reason.length();
if (len>_headerBufferSize/2)
len=_headerBufferSize/2;
_reason=new ByteArrayBuffer(len);
for (int i=0;i<len;i++)
}
}
Activity
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
| Assignee | Greg Wilkins [ gregw ] |
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
I am really loath to change this code.
allowing arbitrary text into the reason string can open up a server to be exploited if any text from "the bad guys" is included in the
reason string.
Are you sure you can't send the information as a header?