RE: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java

2003-07-02 Thread Mayne, Peter
Title: RE: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java





Impressively fast fix.


Seeing what you've fixed, I can now reinterpret the Sun documentation and see what was going on.


Thanks.


PJDM
-- 
Peter Mayne
Technology Consultant
Spherion Technology Solutions
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
T: 61 2 62689727 F: 61 2 62689777


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 2 July 2003 4:33 PM
 To: [EMAIL PROTECTED]
 Subject: cvs commit: 
 jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
 
 
 billbarker 2003/07/01 23:33:17
 
 Modified: jk/java/org/apache/jk/server Tag: coyote_10 JkMain.java
 Log:
 The beauty of cut-and paste is that I can be brain-dead in 
 multiple locations ;-).
 
 Revision Changes Path
 No revision
 
 
 No revision
 
 
 1.32.2.2 +1 -1 
 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java
 
 Index: JkMain.java
 ===
 RCS file: 
 /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/serv
er/JkMain.java,v
 retrieving revision 1.32.2.1
 retrieving revision 1.32.2.2
 diff -u -r1.32.2.1 -r1.32.2.2
 --- JkMain.java 2 Jul 2003 03:44:32 - 1.32.2.1
 +++ JkMain.java 2 Jul 2003 06:33:16 - 1.32.2.2
 @@ -282,7 +282,7 @@
 log.warn( No properties file found  
 + propsF );
 }
 }
 - String initHTTPS = props.get(class.initHTTPS);
 + String initHTTPS = (String)props.get(class.initHTTPS);
 if(true.equalsIgnoreCase(initHTTPS)) {
 initHTTPSUrls();
 }
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


The information contained in this email and any attachments to it:

(a) may be confidential and if you are not the intended recipient, any interference with, 
use, disclosure or copying of this material is unauthorised and prohibited; and

(b) may contain personal information of the recipient and/or the sender as defined 
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to 
collect, hold and use such information and any personal information contained in a 
response to this email, for any reasonable purpose in the ordinary course of 
Spherion's 
business, including forwarding this email internally or disclosing it to a third party. All 
personal information collected by Spherion will be handled in accordance with 
Spherion's Privacy Policy. If you have received this email in error, please notify the 
sender and delete it.

(c) you agree not to employ or arrange employment for any candidate(s) supplied in 
this email and any attachments without first entering into a contractual agreement with 
Spherion. You further agree not to divulge any information contained in this document 
to any person(s) or entities without the express permission of Spherion.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

isapi_redirector2 and wrapped headers: updated binary available?

2003-07-01 Thread Mayne, Peter
Title: isapi_redirector2 and wrapped headers: updated binary available?





I'm using IIS + Tomcat 4.1.24 + JK2 isapi_redirector2.dll. Everything has
been working so far.


However, now I'm receiving HTTP headers containing a Content-Type that is
continued on another line, and isapi_redirector2.dll is broken. (Sending the
exact same request direct to Tomcat works fine, and sending the same request
via the redirector with the Content-Type edited to be on one line works.)


I'm using the v2.0.2 (27-Nov-2002) prebuilt binary of the redirector, so I
thought I'd try the nightly, but it's dated 5-Oct-2002! (And I don't have CVS
access.)


I think I've seen mention of an updated isapi_redirector2.dll on the -user list,
but there are so many JK2 related problems that searching the archive is a
lost cause. Is there an updated prebuilt binary that hopefully fixes this
bug available somewhere? Alternatively, is JK known to handle this
correctly? If so, I could drop back to that.


Thanks.


What the headers in the HTTP request are (that's a TAB in front of
boundary):


Host: aaa 
SOAPAction: ebXML
Message-ID: bbb
Content-Type: multipart/related; type=text/xml; start=ccc; 
 boundary=ddd
Content-Length: 8719
Connection: close


What Tomcat (correctly) sees when the request is sent direct to Tomcat
(ordering is irrelevant):


MIME host [aaa]
MIME soapaction [ebXML]
MIME message-id [bbb]
MIME content-type [multipart/related; type=text/xml; start=ccc;
boundary=ddd]
MIME content-length [8719]
MIME connection [close]


What Tomcat (incorrectly) sees when the request is sent via
IIS/isapi_redirector2.dll (that's a newline after boundary=ddd):


MIME connection [close]
MIME host [aaa]
MIME content-type [multipart/related; type=text/xml; start=ccc; ]
MIME soapaction [ebXML]
MIME message-id [bbb]
MIME boundary=ddd
content-length [8719]
MIME content-length [0]


PJDM
-- 
Peter Mayne
Technology Consultant
Spherion Technology Solutions
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
T: 61 2 62689727 F: 61 2 62689777


The information contained in this email and any attachments to it:

(a) may be confidential and if you are not the intended recipient, any interference with, 
use, disclosure or copying of this material is unauthorised and prohibited; and

(b) may contain personal information of the recipient and/or the sender as defined 
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to 
collect, hold and use such information and any personal information contained in a 
response to this email, for any reasonable purpose in the ordinary course of 
Spherion's 
business, including forwarding this email internally or disclosing it to a third party. All 
personal information collected by Spherion will be handled in accordance with 
Spherion's Privacy Policy. If you have received this email in error, please notify the 
sender and delete it.

(c) you agree not to employ or arrange employment for any candidate(s) supplied in 
this email and any attachments without first entering into a contractual agreement with 
Spherion. You further agree not to divulge any information contained in this document 
to any person(s) or entities without the express permission of Spherion.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Using my own TrustManager for SSL doesn't work in Tomcat

2003-07-01 Thread Mayne, Peter
Title: Using my own TrustManager for SSL doesn't work in Tomcat





Tomcat 4.1.24-LE, Sun JDK 1.4.1_01-b01, Windows XP 


I need to install my own TrustManager to handle client SSL connections. 


If I write a standalone test program to use my own TrustManager (with HttpURLConnection), it works fine. 


If I install my own TrustManager in a servlet, the result is exactly as if I hadn't installed my TrustManager at all. 


I've put the code from my source program into a servlet and done some comparisons. 


In the standalone program, the HTTPS connection is implemented by sun.net.www.protocol.https.HttpsURLConnectionImpl, so setting the default SSL socket factory with HttpsURLConnection.setDefaultSSLSocketFactory() works fine.

In the servlet, the HTTPS connection is implemented by com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl, so setting the default SSL socket factory as above doesn't work. Instead, I have to use HttpsURLConnectionOldImpl.setDefaultSSLSocketFactory(), which (unsurprisingly) is deprecated.

Why does Tomcat cause a different implementation of HttpsURLConnection to be used? How do I get it to use the non-deprecated implementation?

The only vaguely relevant thing I can find is in SSLServerSocketFactory.java, which explicitly adds com.sun.net.ssl.internal.www.protocol to the java.protocol.handler.pkgs system property. In 1.4, this is not only unnecessary, but will use an old version of HttpsURLConnection, so this could be construed as a bug. (See JDKdirectory/docs/guide/security/jsse/JSSERefGuide.html#HttpsURLConnectionEx.) However, I'm not using an SSLServerSocket, and I don't have any SSL in my server.xml, so I'm not sure what affect it has.

Thanks. 


PJDM
-- 
Peter Mayne
Technology Consultant
Spherion Technology Solutions
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
T: 61 2 62689727 F: 61 2 62689777


The information contained in this email and any attachments to it:

(a) may be confidential and if you are not the intended recipient, any interference with, 
use, disclosure or copying of this material is unauthorised and prohibited; and

(b) may contain personal information of the recipient and/or the sender as defined 
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to 
collect, hold and use such information and any personal information contained in a 
response to this email, for any reasonable purpose in the ordinary course of 
Spherion's 
business, including forwarding this email internally or disclosing it to a third party. All 
personal information collected by Spherion will be handled in accordance with 
Spherion's Privacy Policy. If you have received this email in error, please notify the 
sender and delete it.

(c) you agree not to employ or arrange employment for any candidate(s) supplied in 
this email and any attachments without first entering into a contractual agreement with 
Spherion. You further agree not to divulge any information contained in this document 
to any person(s) or entities without the express permission of Spherion.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]