[tclwebtest] Correct eval call from do_request
Status: Abandoned
Brought to you by:
tils
From: Grzegorz A. H. <gr...@ef...> - 2003-01-30 18:28:23
|
My previous post advanced a problem with -noredirect, introduced before. This parameter makes do_request return the targeted url without following it. The problem was that it wasn't being set correctly when the redirection was followed. Hence, with this script: log "We ended up at: [do_request http://www.efaber.com/]" ...the output is: --- do_request for http://www.efaber.com/ http status: >>302<< following a redirect to: http://www.efaber.net --- do_request for http://www.efaber.net http status: >>200<< We ended up at: http://www.efaber.com/ So, the attached patch fixes this, and the result is now: --- do_request for http://www.efaber.com/ http status: >>302<< following a redirect to: http://www.efaber.net --- do_request for http://www.efaber.net http status: >>200<< We ended up at: http://www.efaber.net The peculiar reason for computing the commands for eval as a list are explained in a book about tcl I have right here, which says that using double quotes is bad because structure is lost. More importantly, my previous grief with a void redirection is now worse: since the empty url is processed correctly, the procedure absolute_link returns the same url, and hence tclwebtest runs into an infinite loop. This should point out that either "" as relative url is invalid, or there's a problem with tclwebtest for not being able to parse a chain of redirections ending on a void one (maybe my suggestion for a history variable is right after all?). -- 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) |