FULL PRODUCT VERSION :
ADDITIONAL OS VERSION INFORMATION :
WINDOWS XP, WINDOWS 2000
EXTRA RELEVANT SYSTEM CONFIGURATION :
The plug-in sends content-length in the CONNECT message.
A DESCRIPTION OF THE PROBLEM :
If one sets the content-length in the the java code as follws:
conn.setRequestProperty("content-length", "" + toSendData.length());
The CONNECT message that is sent to the proxy contains the content-length field with the corresponding length. A CONNECT message should have content-length 0. It is in the next POST message that the content-length of the data should be placed. Some proxy server are very picky about this and refuses to set up a connection. If we do not set the content-length explicitly in the code it works fine. A fix would be to set content-length 0 in a CONNECT message.
The error is in jre 1.4 and jre 1.5
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We use Tren Micro IWSS inhouse and this one refuses to set up a connection.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
conn.setRequestProperty("content-type", "application/x-www-form-urlencoded; charset=iso-8859-1");
conn.setRequestProperty("content-length", "" + toSendData.length());
out = new BufferedOutputStream(conn.getOutputStream());
out.write(toSendData.getBytes("ISO-8859-1"));
out.flush();
out.close();
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
if we do not set content-length explicitly it works.
ADDITIONAL OS VERSION INFORMATION :
WINDOWS XP, WINDOWS 2000
EXTRA RELEVANT SYSTEM CONFIGURATION :
The plug-in sends content-length in the CONNECT message.
A DESCRIPTION OF THE PROBLEM :
If one sets the content-length in the the java code as follws:
conn.setRequestProperty("content-length", "" + toSendData.length());
The CONNECT message that is sent to the proxy contains the content-length field with the corresponding length. A CONNECT message should have content-length 0. It is in the next POST message that the content-length of the data should be placed. Some proxy server are very picky about this and refuses to set up a connection. If we do not set the content-length explicitly in the code it works fine. A fix would be to set content-length 0 in a CONNECT message.
The error is in jre 1.4 and jre 1.5
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We use Tren Micro IWSS inhouse and this one refuses to set up a connection.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
conn.setRequestProperty("content-type", "application/x-www-form-urlencoded; charset=iso-8859-1");
conn.setRequestProperty("content-length", "" + toSendData.length());
out = new BufferedOutputStream(conn.getOutputStream());
out.write(toSendData.getBytes("ISO-8859-1"));
out.flush();
out.close();
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
if we do not set content-length explicitly it works.
- duplicates
-
JDK-6226610 HTTP tunnel connections send user headers to proxy
- Resolved