is the "https" patch necessary

[email protected] Tue, 5 Mar 2002 10:32:21 -0600
Newsgroups gmane.comp.djb.publicfile
Message-ID <[email protected]>
To run a stunneled httpd on the https port in the
/publics directory---after running configure---I change the run file to

#!/bin/sh
exec 2>&1
exec envuidgid root softlimit -o20 -d50000 tcpserver -vDRHl0 -b50 -c100 0 443 stunnel -f -l /usr/local/publicfile/bin/httpd  -- httpds /publics/file

This works for me with an _unpatched_ httpd as well.  

But it was suggested that publicfile does not accept URLs that start
with https://, and for that one needs the patch

--- httpd.c.orig        Tue Nov  9 02:23:46 1999
+++ httpd.c     Sun Dec  9 21:30:59 2001
@@ -271,8 +271,16 @@
       if (!stralloc_copyb(&path,host.s + i,host.len - i)) _exit(21);
       host.len = i;
     }
-    else
-      if (!stralloc_copy(&path,&url)) _exit(21);
+    else {
+      if (case_startb(url.s,url.len,"https://")) {
+       if (!stralloc_copyb(&host,url.s + 8,url.len - 8)) _exit(21);
+       i = byte_chr(host.s,host.len,'/');
+       if (!stralloc_copyb(&path,host.s + i,host.len - i)) _exit(21);
+       host.len = i;
+      }
+      else
+       if (!stralloc_copy(&path,&url)) _exit(21);
+    }
 
     if (!path.len || (path.s[path.len - 1] == '/'))
       if (!stralloc_cats(&path,"index.html")) _exit(21);

So in what sense is the above patch necessary for https service?
Would there be an overflow somewhere if I did not apply it?

Mate