From: Bradley Nicholes Date: Fri, 30 Nov 2001 17:24:31 +0000 (+0000) Subject: Simplified the test to determine if a NetWare socket is secure or not X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9458e92b735c6c088b19153ae86b5830608b651;p=thirdparty%2Fapache%2Fhttpd.git Simplified the test to determine if a NetWare socket is secure or not Submitted by: Pavel Novy git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@92264 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/os/netware/os.c b/src/os/netware/os.c index fdbab377c96..54043fa8051 100644 --- a/src/os/netware/os.c +++ b/src/os/netware/os.c @@ -351,26 +351,9 @@ DIR *os_readdir (DIR *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; - } + unsigned int optParam; - 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"; }