Attachment "464560_ncgi_redirect.diff" to
ticket [464560ffff]
added by
andreas_kupries
2001-10-21 07:24:29.
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 <[email protected]>
+
+ * ncgi: Fixed bug #464560.
+
2001-10-17 Andreas Kupries <[email protected]>
* 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 <[email protected]>
+
+ * ncgi.tcl (ncgi::redirect): Fixed bug #464560 reported by Ed
+ Rolfe <[email protected]>. 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 <[email protected]>
* 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]} {