Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Problem found.</p> <p>httpdthread.tcl</p> <pre><code># Core modules package require httpd ;# Protocol stack package require httpd::version ;# Version number package require httpd::url ;# URL dispatching package require httpd::mtype ;# Mime types # Search for mime.types either right in Config(lib), or down # one level in the installed tclhttpd subdirectory foreach path [list \ [file join $Config(lib) mime.types] \ [glob -nocomplain [file join $Config(lib) tclhttpd* mime.types]] \ ] { if {[llength $path] &gt; 0} { set path [lindex $path 0] } if {[file exists $path]} { Mtype_ReadTypes $path break } } </code></pre> <p>This code checks for the mime.types file under following paths: - /home/a2/..../tclhttpd3.5.1.kit/bin/../lib - /home/a2/..../tclhttpd3.5.1.kit/bin/../lib/tclhttpd*/mime.types</p> <p><strong>Linux</strong></p> <pre><code>glob -nocomplain /home/..../tclhttpd3.5.1.kit/bin/../lib/tclhttpd*/mime.types] </code></pre> <p>works fine and returns</p> <pre><code>/home/....tclhttpd3.5.1.kit/bin/../lib/tclhttpd3.5.1/mime.types </code></pre> <p><strong>Windows</strong></p> <pre><code> glob -nocomplain /home/..../tclhttpd3.5.1.kit/bin/../lib/tclhttpd*/mime.types] </code></pre> <p>failed.</p> <p>I have tried different masks:</p> <ul> <li>tclhttpd*</li> <li>tclhttpd*.*</li> <li>tclhttpd*.<em>.</em></li> </ul> <p>nothing is working</p> <p>Finally I have modified the code:</p> <pre><code>foreach path [list \ [file join $Config(lib) mime.types] \ [glob -nocomplain [file join $Config(lib) tclhttpd* mime.types]] \ [file join $Config(lib) [lindex [Httpd_Version] 0] mime.types] ] { if {[llength $path] &gt; 0} { set path [lindex $path 0] } if {[file exists $path]} { Mtype_ReadTypes $path break } } </code></pre> <p>string</p> <pre><code>[file join $Config(lib) [lindex [Httpd_Version] 0] mime.types] </code></pre> <p>generate the path:</p> <pre><code>/home/..../tclhttpd3.5.1.kit/bin/../lib/tclhttpd3.5.1/mime.types </code></pre> <p>Now tclhttpd could find mime.types under windows.</p> <p>And it looks like that problem happened only if <strong>glob</strong> is searching inside the statkit file.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload