httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apache-1.3/src/os/netware os.h os.c
Date Mon, 13 Aug 2001 17:12:38 GMT
bnicholes    01/08/13 10:12:38

  Modified:    src/os/netware os.h os.c
  Log:
  Added ap_os_http_method(r) for NetWare so that we can return the
  appropriate http method (ie. http or https) based on a secure or unsecure
  socket.
  
  Revision  Changes    Path
  1.18      +1 -0      apache-1.3/src/os/netware/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/netware/os.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- os.h	2001/08/10 01:15:51	1.17
  +++ os.h	2001/08/13 17:12:38	1.18
  @@ -164,5 +164,6 @@
   char *bslash2slash(char*);
   void init_name_space(void);
   int ap_os_is_filename_valid(const char *file);
  +char *ap_os_http_method(void *r);
   #endif /*! APACHE_OS_H*/
   
  
  
  
  1.17      +29 -0     apache-1.3/src/os/netware/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/netware/os.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- os.c	2001/05/30 07:41:06	1.16
  +++ os.c	2001/08/13 17:12:38	1.17
  @@ -56,6 +56,8 @@
    * University of Illinois, Urbana-Champaign.
    */
   
  +#define WS_SSL
  +
   #include "httpd.h"
   #include "ap_config.h"
   #include "http_config.h"
  @@ -339,3 +341,30 @@
       else
           return readdir_411 (dirP);
   }
  +
  +char *ap_os_http_method(void *r)
  +{
  +    int s = ((request_rec*)r)->connection->client->fd;
  +    long e;
  +	struct sslserveropts *getOpts;
  +	size_t getOptLen = sizeof(getOpts);
  +    char *http_method = "http";
  +
  +    getOpts = ap_pcalloc(((request_rec*)r)->pool, getOptLen);
  +    if (WSAIoctl(s, SO_SSL_GET_SERVER, 0, 0, (char *)getOpts, getOptLen, &getOptLen,
NULL, NULL)) {
  +		e = WSAGetLastError();
  +		if(e == WSAEFAULT)
  +		{
  +            getOpts = ap_pcalloc(((request_rec*)r)->pool, getOptLen);
  +            if (WSAIoctl(s, SO_SSL_GET_SERVER, 0, 0, (char *)getOpts, getOptLen, &getOptLen,
NULL, NULL)) {
  +				errno = WSAGetLastError();
  +            }
  +            else
  +                http_method = "https";
  +		}
  +        else
  +		    errno = e;
  +	}
  +
  +   return http_method;
  +}
  \ No newline at end of file
  
  
  

Mime
View raw message