Hello there.
first, thanks to provide AJP client source. very helpful for study AJP.
writeString method in ForwadImpl.class encode String format in AJP.
But, If Input the null to writeString method, it encode just "0xff".
I input the null to "REMOTE_HOST" and below is packet dump. it does not work for me.
I add 0xff like below code.
protected static void writeString(final String s, final DataOutputStream d) throws IOException {
if (s == null) {
d.writeByte(0xff);
d.writeByte(0xff);
} else {
d.writeShort(s.length());
d.write(s.getBytes());
d.writeByte(0);
}
}
it is works for me.
also tomcat document mention following message "Note a size of -1 (65535) indicates a null string and no data follow the length in this case."
Hello there. first, thanks to provide AJP client source. very helpful for study AJP.
writeString method in ForwadImpl.class encode String format in AJP. But, If Input the null to writeString method, it encode just "0xff". I input the null to "REMOTE_HOST" and below is packet dump. it does not work for me.
I add 0xff like below code.
it is works for me.
also tomcat document mention following message "Note a size of -1 (65535) indicates a null string and no data follow the length in this case."
My Test Tomcat version is 6.0.48
I look forward to your reply. thanks!!!