]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Added ap_os_http_method(r) for NetWare so that we can return the
authorBradley Nicholes <bnicholes@apache.org>
Mon, 13 Aug 2001 17:12:38 +0000 (17:12 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Mon, 13 Aug 2001 17:12:38 +0000 (17:12 +0000)
appropriate http method (ie. http or https) based on a secure or unsecure
socket.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@90140 13f79535-47bb-0310-9956-ffa450edef68

src/os/netware/os.c
src/os/netware/os.h

index 12383138dd2af2dbb9f373c331b1dc2fa541a0d8..5b534090df9f5d0ac9bada0f28c4b74cfe78ef68 100644 (file)
@@ -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 @@ DIR *os_readdir (DIR *dirP)
     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
index 3ed87f312b6cb822719330fde670d5cfe7ec32f6..85e363e6e48c28276e2a738f438f3a24e5b8f2cf 100644 (file)
@@ -164,5 +164,6 @@ char *remove_filename(char*);
 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*/