Ack - I discovered two bugs last night but decided I only needed one fixed,
but it was late and I was obviously wrong. There is a necessary one-character
change to doc.tcl as well:
diff -c -c -r1.33 doc.tcl
*** doc.tcl 2000/05/11 06:00:31 1.33
--- doc.tcl 2000/05/19 17:10:52
***************
*** 215,221 ****
if {[info exist Doc(root,$data(prefix))]} {
set directory $Doc(root,$data(prefix))
} else {
! set directory [file join $Doc(root,/) [string trimleft $data(prefix)]]
}
# Look for .htaccess and .tclaccess files along the path
--- 215,221 ----
if {[info exist Doc(root,$data(prefix))]} {
set directory $Doc(root,$data(prefix))
} else {
! set directory [file join $Doc(root,/) [string trimleft $data(prefix)
/]]
}
# Look for .htaccess and .tclaccess files along the path
Look's like I'll churn a 3.0.3 later today...
>>>petrus vloet said:
>
> Hi Brent,
>
> The fix you made works well.
>
> Now I continued with Doc_AddRoot and came to following results:
>
> Doc_AddRoot can only be called after ...thread.tcl has been sourced:
>
>
> if {[catch {source $Config(main)} message]} then {
> global errorInfo
> set error "Error processing main startup script \"[file nativename
> $Config(m
> ain)]\"."
> append error "\n$errorInfo"
> error $error
> }
>
> Doc_AddRoot /aaa /usr/local/www/docs/aaa
> Doc_AddRoot /bbb /usr/local/www/docs/bbb
>
> And now the results of my tests:
>
> In the directory aaa I have an index.html file in bbb not:
>
> The results are the following:
>
> ...:8015/aaa/index.html gives on stderr:
> /usr/local/www/docs/nk2000/index.html: syntax error at line 2: `newline
> or ;' unexpected
>
>
> ..:8015/bbb
> shows everything in the root directory of my host
>
> so ..8015/bbb/etc/passwd
> shows me once again the password file.
>
>
> Conclusion: Do not use Doc_AddRoot in Version 3.0.0 till 3.0.2.
>
> The position where to call Doc_AddRoot is a little bit nasty.
> Outside a Resource File and somewhere in the middle of the code.
> Would be great to get a solution so that Doc_AddRoot can be used in
> tclhttpd.rc.
>
> --
> #-------With best regards, Mit freundlichen Gruessen, Met vriendelijke
groet, ------
> # Piet Vloet
> # Siemens AG Austria
> # Boschstrasse 10 Phone : +43-51707-42906
> # A-1190 Vienna Fax : +43-51707-52606
> # mailto:[EMAIL PROTECTED] WWW:http://www.siemens.at
>
>
>
-- Brent Welch <[EMAIL PROTECTED]>
http://www.scriptics.com
Scriptics: The Tcl Platform Company