Hello Chuck;

I have already done what you suggest, before I posted this thread. But it does not conclusively prove that the request is using SSL, it just guesses :)

Don
On May 2, 2008, at 2:47 PM, Chuck Hill wrote:


On May 2, 2008, at 11:41 AM, Don Lindsay wrote:

Hello;

I have tried this code but it only works with wotaskd and apache.

Think man! You need to change the header names and expected port numbers to work with what you have:
x-webobjects-servlet-server-port = ( 8443 );

Chuck


I have not tried it with IIS. As a side question is a connector for WOTASKD and IIS?

Don
On May 2, 2008, at 2:26 AM, Simon McLean wrote:

Hi Don -

I'm using the code below and have never had a problem, but it's being served through montior/wotaskd/apache.

Simon

   public static boolean isRequestSecure(WORequest request)
   {
       boolean issecure = false;
       try
       {
           String serverPort = serverPort(request);
           String https = request.headerForKey("HTTPS");
           if(https != null && https.equals("ON"))
               issecure = true;
           if(serverPort != null && serverPort.equals("443"))
               issecure = true;
       }
       catch(Throwable e)
       {
           e.printStackTrace();
       }
       return issecure;
   }


   public static String serverPort(WORequest request)
   {
       String value = request.headerForKey("SERVER_PORT");
       if(value != null)
           return value;
       value = request.headerForKey("x-webobjects-server-port");
       if(value != null)
           return value;
       else
           return null;
   }


On 2 May 2008, at 06:41, Don Lindsay wrote:

Hello;

here is a dump of all the headers:

{user-agent = ( Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18 ); accept = ( text/xml,application/xml,application/ xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 ); remote_addr = ( 0:0:0:0:0:0:0:1%0 ); x-webobjects-servlet-server- port = ( 8443 ); referer = ( https://localhost:8443/dwtm/WebObjects/dwtm.woa ); content-type = ( application/x-www-form-urlencoded ); x- webobjects-servlet-server-name = ( localhost ); accept-encoding = ( gzip, deflate ); content-length = ( 78 ); host = ( localhost: 8443 ); accept-language = ( en-us ); connection = ( keep-alive ); }

right now I am running just in Tomcat with a SSL certificate installed on port 8443.

Don
On May 1, 2008, at 11:40 PM, Chuck Hill wrote:


On May 1, 2008, at 8:34 PM, Don Lindsay wrote:

Dang, :)  It is not in the headers :)

:-(

Any chance it is there, but you are not seeing it? Can you post the headers?


Chuck


On May 1, 2008, at 10:06 PM, Chuck Hill wrote:


On May 1, 2008, at 7:01 PM, Don Lindsay wrote:

Hello;

I want to identify if an application is being served via SSL. How can I do this? I have looked at all the headers available through the request.

Is it in the headers for normal deployments. For servlets and IIS, I have no idea. If it is not in the headers, you are not in a good place.


Also, how can I get a handle to a client certificate if a person has a PKI card?


No idea.

Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/simon_mclean%40mac.com

This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to