You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2001/11/30 18:24:31 UTC

cvs commit: apache-1.3/src/os/netware os.c

bnicholes    01/11/30 09:24:31

  Modified:    src/os/netware os.c
  Log:
  Simplified the test to determine if a NetWare socket is secure or not
  Submitted by: Pavel Novy
  
  Revision  Changes    Path
  1.20      +4 -21     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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- os.c	2001/08/23 13:34:43	1.19
  +++ os.c	2001/11/30 17:24:31	1.20
  @@ -351,26 +351,9 @@
   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";
  +    unsigned int optParam;
   
  -    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;
  +    if (!WSAIoctl(s, SO_SSL_GET_FLAGS, NULL, 0, &optParam, sizeof(optParam), NULL, NULL, NULL))
  +        if (optParam & (SO_SSL_ENABLE | SO_SSL_SERVER)) return "https";
  +    return "http";
   }