Fix for a rare redirection problem with eval

Grzegorz Adam Hankiewicz <[email protected]> Thu, 21 Aug 2003 20:00:23 +0200
Newsgroups gmane.comp.web.tclwebtest
Message-ID <[email protected]>
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi.

I'm working now on an intranet for a client of us, and the
restructuration led to a few new pages and redirections. These new
redirections make tclwebtest fail testing units. The failure consists
on a redirected url having a semicolon. The semicolon is parsed by
eval as a command separation, thus, you get this output in the log:

> [...]
> --- do_request for http://192.168.1.50:8014/a-gastos/request-ae-2
> http status: >>302<<
> following a redirect to: request-planning-travel?id=330&from=sel_new;one_req
> --- do_request for http://192.168.1.50:8014/a-gastos/request-planning-travel?id=330&from=sel_new
> http status: >>200<<
> 
> invalid command name "one_req"
>     while executing
> "one_req"
>     ("eval" body line 1)
>     invoked from within
> "eval "do_request $nocomplain_option $followequiv_option $location""
>     (procedure "do_request" line 134)
>     invoked from within
> [...]

As you can see, the `one_req' part of the url is parsed as a
command. I didn't find any other way to solve this than create a
temporary list for eval to use it. This way, parameters can have
characters which eval could process with another meaning, like
the semicolon.

Til, are you ok with this patch? Is there any easier way to go around
this?

Gordon Molek, could you try this patch against your Apache server
with httpauth and see if I have broken something? The patch works
fine with tclwebtest's selftest directory and my own batch of unit
tests, but I don't have any Apache to play.

-- 
 Grzegorz Adam Hankiewicz, [email protected] Tel: +34-94-472 35 89.
 eFaber SL, Maria Diaz de Haro, 68, 2         http://www.efaber.net/
 48920 Portugalete, Bizkaia (SPAIN)

--ZPt4rx8FFjLCG7dd
Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="eval_fix.diff.gz"
Content-Transfer-Encoding: base64

H4sICGYFRT8AA2V2YWxfZml4LmRpZmYA1VfbbttGEH0Ov2KqCkkLXSzLTp0IjuGiT+1LgcRA
H1xDWJFLcZsll9ldilYN/XtndnkTRRcG/NISiXkR58zMObOzw1+ziD+uQIrNmQ1lyTeWGzvH
y+DT64/g8y9fIBaSr+As3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78LOT0Bnl3yHO4w+61UyLyGKEsLIZLEXYIuObpDd8hKSnuiNdneEe+kd+GTkzU8CoO
Amd6W1BVGOefnri6wbKqlDf0MCWiMGyB41ot4HV+U1/eoRkWw0bSi2TAbAtVVWlHHKoUCyHT
PC5Qc49RKUUuHAOcRUQAg2+Fsqik7yZz+J24LIXhU2pfjrRHRjXT5tRVpm7RGEZmsTMgEoOY
l7isUhEqqTIzbWKtqK0CLt0u4ghzbzQWjh2TS+GzrNoeMmTLqkhEFomdiIo2ffRSJoLUNZCh
+iVxhFtVSYUhlfpKEJjN1ANseMiKE78lc5Vq68rIMI86wbk3HNJGk8xIOzNY9rTIME6g6R5/
yWy3fvyyaWJFq4qSRBlerUU3WG1uqGavzzY37dJZtfMzqlK3xjlFUC8dneLWXuJ4B3VyO6YF
w8IhyDoVB8tca5xWDNAUUNfJM9b49pEhy3OOMiCtktFEYeswXOfHNY+9H3zvp0ryS9TJwbJ9
w2anYxU5uoPjwev4rrMB9W7+bDeXznNX7Kf3NY0OpHPTAaGORP+b8m4u+vvayYM6HdpXXGtZ
1wV/7/y35fBQFfPAwHmo+7rbzDzVPbTRrGNSba6HLuIRQS8CbC0G8O6l5NkWC3TcY/SBZprF
Szz0LQeD7gjywqBri+Og/TYG+Bk9dv2/A9Wso86zf3ExNIce2st6Jb4UDeuqNwv51E8qqx0V
Tyan57D7GD1Hh8EEIh4z/D7p++FaY58ZfUmoT2fvaPvfUfPHPRS7PG178/n8lJLqVM81RxEG
NIsHcDLbuG8i/wGF7LjpS2nxt19xT8E/sq+25t8RAAA=

--ZPt4rx8FFjLCG7dd--


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0