Fixed broken scheme computation in extension
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 27 Oct 2004 20:36:27 +0000 (20:36 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 27 Oct 2004 20:36:27 +0000 (20:36 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1243 cb58f699-b61c-0410-a6fe-9272a202ed29

isapi_shib/isapi_shib.cpp

index 4ceb1ce..e75f578 100644 (file)
@@ -765,7 +765,7 @@ IRequestMapper::Settings map_request(
 {
     dynabuf ssl(5);
     GetServerVariable(lpECB,"HTTPS",ssl,5);
-    bool SSL=(ssl=="on");
+    bool SSL=(ssl=="on" || ssl=="ON");
 
     // URL path always come from IIS.
     dynabuf url(256);
@@ -782,8 +782,9 @@ IRequestMapper::Settings map_request(
 
     // Scheme may come from site def or be derived from IIS.
     const char* scheme=site.m_scheme.c_str();
-    if (!scheme || !*scheme || !g_bNormalizeRequest)
-        scheme=lpECB->lpszMethod;
+    if (!scheme || !*scheme || !g_bNormalizeRequest) {
+        scheme = SSL ? "https" : "http";
+    }
 
     // Start with scheme and hostname.
     if (g_bNormalizeRequest) {