Re: [tclwebtest] Bug in matching syntax of "link follow" and relative url construction
Status: Abandoned
Brought to you by:
tils
From: Grzegorz A. H. <gr...@ef...> - 2003-01-31 11:38:54
|
On Wed, Jan 29, 2003 at 06:17:40PM +0100, Grzegorz Adam Hankiewicz wrote: > Besides, look at how the double slash confuses tclwebtest, it is > a shorthand to avoid typing "http:", but tclwebtest constructs an > incorrect relative url. This patch fixes the incorrect relative url construction with web pages like http://slashdot.org/. Index: tclwebtest.tcl =================================================================== RCS file: /home/maincvs/efintranet/www/tclwebtest/prog/tclwebtest.tcl,v retrieving revision 1.15 diff -u -r1.15 tclwebtest.tcl --- tclwebtest.tcl 31 Jan 2003 09:11:27 -0000 1.15 +++ tclwebtest.tcl 31 Jan 2003 11:28:11 -0000 @@ -2042,6 +2042,10 @@ same url again not supported return $::tclwebtest::url + } elseif { [string range $url 0 1] == "//" } { + # append protocol + regexp {(https?:).*} $::tclwebtest::url match protocol + return "$protocol$url" } elseif { [string range $url 0 0] == "/" } { # append host regexp {(https?://[^/]+)} $::tclwebtest::url match host_part Ignore the above line "same url again not supported", I have put it there temporarily in my copy to avoid crashing the server with infinite redirections. Looks like AOLserver doesn't give much memory space/stack to TCL, because running from the commandline I can endlessly watch the self redirection bug for minutes, until I get bored, of course. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |