|
Hello All,
I don't know if anyone
out here is using SimpleAxisServer (which is supposed not to be too much reliable),
but i've had to in a project and it didn't work until we traced a bug in
SimpleAxisWorker.java.
The problem in
cuestion is that inside the function
"private int
parseHeaders(...)", due to a clear cut'n'paste technique, the value for
ContentType after the parsing is set to ContentLocation. Here's the original
code:
...
} else if (endHeaderIndex ==
locationLen && matches(buf, locationHeader)) {
while (++i < n
&& (buf[i] != '\r') && (buf[i] != '\n')) {
if
(buf[i] == ' ') continue;
contentLocation.append((char)
(buf[i] & 0x7f));
}
headers.addHeader(HTTPConstants.HEADER_CONTENT_LOCATION,
contentLocation.toString());
} else if (endHeaderIndex ==
typeLen && matches(buf, typeHeader)) {
while (++i < n
&& (buf[i] != '\r') && (buf[i] != '\n')) {
if
(buf[i] == ' ') continue;
contentType.append((char) (buf[i] & 0x7f));
}
headers.addHeader(HTTPConstants.HEADER_CONTENT_TYPE,
contentLocation.toString()); <--- ERROR !!!!
}
And the patch is as
simple as replacing the error line with:
headers.addHeader(HTTPConstants.HEADER_CONTENT_TYPE,
contentType.toString());
I'll post the error to
JIRA too.
Hope being useful.

|