tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmand...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/netscape jk_nsapi_plugin.c
Date Thu, 14 Jun 2001 19:42:13 GMT
mmanders    01/06/14 12:42:13

  Modified:    jk/native/netscape jk_nsapi_plugin.c
  Log:
  Migrated NetWare specific virtual server fixes from 3.3 codebase.
  
  Revision  Changes    Path
  1.4       +34 -1     jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c
  
  Index: jk_nsapi_plugin.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_nsapi_plugin.c	2001/06/08 14:43:28	1.3
  +++ jk_nsapi_plugin.c	2001/06/14 19:42:10	1.4
  @@ -56,7 +56,7 @@
   /***************************************************************************
    * Description: NSAPI plugin for Netscape servers                          *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.3 $                                               *
  + * Version:     $Revision: 1.4 $                                               *
    ***************************************************************************/
   
   
  @@ -88,6 +88,10 @@
   
   static jk_logger_t *logger = NULL;
   
  +#ifdef NETWARE
  +int (*PR_IsSocketSecure)(SYS_NETFD *csd); /* pointer to PR_IsSocketSecure function */
  +#endif
  +
   static int JK_METHOD start_response(jk_ws_service_t *s,
                                       int status,
                                       const char *reason,
  @@ -310,11 +314,21 @@
           map_free(&init_map);
       }
   
  +#ifdef NETWARE
  +    PR_IsSocketSecure = (int (*)(void **))ImportSymbol(GetNLMHandle(), "PR_IsSocketSecure");
  +#endif
       return rc;    
   }
   
   NSAPI_PUBLIC void jk_term(void *p)
   {
  +#ifdef NETWARE
  +    if (NULL != PR_IsSocketSecure)
  +    {
  +       UnimportSymbol(GetNLMHandle(), "PR_IsSocketSecure");
  +       PR_IsSocketSecure = NULL;
  +    }
  +#endif
       wc_close(logger);
       if(logger) {
           jk_close_file_logger(&logger);
  @@ -411,6 +425,16 @@
       s->query_string     = pblock_findval("query", private_data->rq->reqpb);
   
       s->server_name      = server_hostname;
  +    
  +#ifdef NETWARE
  +    /* On NetWare, since we have virtual servers, we have a different way of
  +     * getting the port that we need to try first.
  +     */
  +    tmp = pblock_findval("server_port", private_data->sn->client);
  +    if (NULL != tmp)
  +        s->server_port = atoi(tmp);
  +    else
  +#endif
       s->server_port      = server_portnum;
       s->server_software  = system_version();
   
  @@ -419,6 +443,15 @@
       s->headers_values   = NULL;
       s->num_headers      = 0;
       
  +#ifdef NETWARE
  +    /* on NetWare, we can have virtual servers that are secure.  
  +     * PR_IsSocketSecure is an api made available with virtual servers to check
  +     * if the socket is secure or not
  +     */
  +    if (NULL != PR_IsSocketSecure)
  +        s->is_ssl       = PR_IsSocketSecure(private_data->sn->csd);
  +    else
  +#endif
       s->is_ssl           = security_active;
       if(s->is_ssl) {
           s->ssl_cert     = pblock_findval("auth-cert", private_data->rq->vars);
  
  
  

Mime
View raw message