Subject: IE Tcl Plugin Local File Problem Resolved - DN [1]


Jeffrey Hobbs <jeffrey.hobbs@scriptics.com> - 06 Jan 2000 - comp.lang.tcl

 Several people noted that there is a problem when loading a
 Tclet locally from IE (there is no prolem with Netscape).
 The problem was that IE gives Tcl an incorrect URL (to be
 strictly correct, it is non-conforming to the spec - but
 since when did MS care?) for the local file.  Anyway, the
 following patch will handle this case for IE, and does not
 pertube correct operation with Netscape.

 At line 79 of TclPlug/utils/url.tcl, replace the 'error' line
 with the following:

         if {[file exists $host:$port]} {
         ## OK, IE gives us a different file: type URL
         ## Handle that here
         set what $host:$port
         regsub ^/+ $what / what
         ## Get it into the way that Tcl likes to see it
         eval file join [file split $what]
         set proto file
         set port {}
         set host {}
         } else {
         error "invalid url \"$url\": non numeric port $port"
         }

 --
    Jeffrey Hobbs                          The Tcl Guy
    jeffrey.hobbs at scriptics.com         Scriptics Corp.

Last modified
2000-01-21

(195.108.246.50)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated