Re: [tclwebtest] [Fwd: Re: tclwebtest http authentication]
Status: Abandoned
Brought to you by:
tils
|
From: Grzegorz A. H. <gr...@ef...> - 2003-02-18 17:39:54
|
> I was wondering if tclwebtest can handle basic http authentication?
This patch adds support for http authentication. Til, do you like
it? I didn't know very well what to do with the package requeriment,
so I added a fake base64::encode function for environments where
this is not available (like my web interface). Here's a basic test
unit and it's generated log:
set serv http://ws5.efaber.net/public_html
http_auth "$serv" pepe pepe
http_auth "$serv/a" a pepe
http_auth "$serv/b" b pepe
http_auth "$serv/c" a pepe
set l [list "$serv\/a" "$serv/b" "$serv/c"]
foreach url $l {
do_request -nocomplain $url
}
> ----- START: in_memory string at [18/Feb/2003:18:25:55] -----
> --- do_request for http://ws5.efaber.net/public_html/a
> http status: >>401<<
> Retrying url with preset authentication
> --- do_request for http://ws5.efaber.net/public_html/a
> http status: >>301<<
> Attention! Redirection 301 was ignored, but please update your test unit, it's a bug!
> following a redirect to: http://ws5.efaber.net/public_html/a/
> --- do_request for http://ws5.efaber.net/public_html/a/
> http status: >>401<<
> Retrying url with preset authentication
> --- do_request for http://ws5.efaber.net/public_html/a/
> http status: >>200<<
> --- do_request for http://ws5.efaber.net/public_html/b
> http status: >>401<<
> Retrying url with preset authentication
> --- do_request for http://ws5.efaber.net/public_html/b
> http status: >>301<<
> Attention! Redirection 301 was ignored, but please update your test unit, it's a bug!
> following a redirect to: http://ws5.efaber.net/public_html/b/
> --- do_request for http://ws5.efaber.net/public_html/b/
> http status: >>401<<
> Retrying url with preset authentication
> --- do_request for http://ws5.efaber.net/public_html/b/
> http status: >>200<<
> --- do_request for http://ws5.efaber.net/public_html/c
> http status: >>401<<
> Retrying url with preset authentication
> --- do_request for http://ws5.efaber.net/public_html/c
> http status: >>401<<
> Incorrect password
> Bad http answer ignored due to -nocomplain
> ----- SUCCESS: in_memory string (took 0s)
While the 'in_memory string' delates it's a log from my web
interface, it works there because I manually included the base64.tcl
file from tcllib so that the package could be satisfied.
--
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)
|