Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcllib/tcllib/ChangeLog,v
retrieving revision 1.67
diff -u -r1.67 ChangeLog
--- ChangeLog	2001/10/17 17:27:25	1.67
+++ ChangeLog	2001/10/21 00:23:07
@@ -1,3 +1,7 @@
+2001-10-20  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
+
+	* ncgi: Fixed bug #464560.
+
 2001-10-17  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
 
 	* tcllib moved to version 1.1
Index: modules/ncgi/ChangeLog
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/ncgi/ChangeLog,v
retrieving revision 1.16
diff -u -r1.16 ChangeLog
--- modules/ncgi/ChangeLog	2001/10/17 17:27:26	1.16
+++ modules/ncgi/ChangeLog	2001/10/21 00:23:08
@@ -1,3 +1,11 @@
+2001-10-20  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
+
+	* ncgi.tcl (ncgi::redirect): Fixed bug #464560 reported by Ed
+	  Rolfe <erolfe@users.sourceforge.net>. The proposed fix is not
+	  used as it does not pass the testsuite. We check for the
+	  existence of "env(REQUEST_URI)" instead, again, and use the
+	  appropriate alternate information if it does not exist.
+
 2001-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
 
 	* ncgi.n:
Index: modules/ncgi/ncgi.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/ncgi/ncgi.tcl,v
retrieving revision 1.24
diff -u -r1.24 ncgi.tcl
--- modules/ncgi/ncgi.tcl	2001/10/17 17:27:26	1.24
+++ modules/ncgi/ncgi.tcl	2001/10/21 00:23:08
@@ -652,7 +652,12 @@
 	# URL.  Otherwise use SERVER_NAME.  These could be different, e.g.,
 	# "pop.scriptics.com" vs. "pop"
 
-	if {![regexp -- {^https?://([^/:]*)} $env(REQUEST_URI) x server]} {
+	if {[info exist env(REQUEST_URI)]} {
+	    # Not all servers have the leading protocol spec
+	    if {![regexp -- {^https?://([^/:]*)} $env(REQUEST_URI) x server]} {
+		set server $env(SERVER_NAME)
+	    }
+	} else {
 	    set server $env(SERVER_NAME)
 	}
 	if {[string match /* $url]} {
