Menu

#91 Running tclhttpd with 8.6.5 tclkit fails

Feature Request
open
None
5
2017-07-24
2016-05-03
No

I am trying to embed tclhttpd into an existing application written with tcl 8.6.5. However, it is failing. If I use, 8.5.19, then it works. However, in that case, some of the features available in 8.6.5 used by the application will not be available.

Would you please help and upload a new version of tclhttpd compatible with 8.6?

thanks

Discussion

  • Pascal F Martin

    Pascal F Martin - 2016-12-11

    I was able to make tclhttpd start (and serve its default web page) using Tcl 8.6.0 (Debian stretch--a.k.a testing) by doing the change below to lib/config.tcl (config::init):

    #interp expose $i file
    interp alias $i file {} file
    

    I admit that blindly opening the parent's file command to the child interpreter is not best practice, to say the least. It would be easy to limit the subcommand to only those deemed necessary for a tclhttpd.rc file ("join", "isdirectory", more?). Left as an exercise to the tclhttpd maintainer (not implying that "sir" Brent would be in need of any Tcl training.. :-)

    It seems that the problem was caused by a tightening of the safe interpreter security, see:

    http://core.tcl.tk/tcl/info/35240baf0f4a245213ba4bf22e7310df06c6673d

     
    • Pascal F Martin

      Pascal F Martin - 2016-12-11

      Correction: Tcl version is 8.6.6.

      Direct URL proc work. Not found any other problem thus far.

       
  • Aditya Mayank Shankar

    With the above mentioned changes, I was able to run httpd in tcl 8.6.6.
    Thanks for yoru help.

     

Log in to post a comment.