TclHttpd is a tcl based web server. The author is [Brent Welch]. It currently resides at sourceForge [http://sourceforge.net/projects/tclhttpd/], which also hosts its modestly active mailing list [http://lists.sourceforge.net/lists/listinfo/tclhttpd-users]. What: Tcl Httpd server Where: http://tclhttpd.sf.net/ Description: A Tcl http web server. Works out of the box as a web server, but is designed to be a Tcl application server. Supports distributing HTML plus Tcl templates. Currently at 3.5.1. Updated: 05/2004 Contact: See web site More than a web server, TclHttpd is a platform for building Tcl applications with an HTTP interface to them. It so happens that it runs as a standalone web server "out of the box", but it is designed with extensibility in mind. You can find distributions at [http://sourceforge.net/projects/tclhttpd] or [http://www.beedub.com/tclhttpd/]. Included in the distribution is a copy of a book chapter (from 3rd edition of Practical Programming in Tcl and Tk) that describes the features of the server [http://www.beedub.com/book/3rd/tclhttpd.pdf]. ---- '''New Release''': The 3.5.1 release (05/2004) fixes many bugs, adds new features and includes a [Starkit] distribution and a bundle distribution (batteries included.) It can be found here: * http://sourceforge.net/projects/tclhttpd * http://www.beedub.com/tclhttpd/ '''CVS Snapshots''': A nightly snapshot of tclhttpd CVS source is available as a tar.bz2 here: [http://cvs.sourceforge.net/cvstarballs/tclhttpd-cvsroot.tar.bz2] and in ZIP form here: [http://tclhttpd.sourceforge.net/tclhttpd.zip]. If you find a bug, it might be worth checking one of these out in case it's been fixed. ---- '''Tclhttpd Pages''': [Tclhttpd - Getting Started] how to begin to use Tclhttpd [Tclhttpd Domains] lists the kinds of 'domains' Tclhttpd supports. [Tclhttpd Examples] for worked examples, gems, mini-applications using Tclhttpd. [TclHttpd Templates] for hints and tips about the tclhttpd .tml template system. [TclHttpd: The .tml File] explains the use of /.tml files [TclHttpd Needs] for projects and flights of fancy about what would improve the already amazing TclHttpd. [TclHttpd Applications] for testimonials and descriptions of applications built around Tclhttpd. [Tclhttpd Hints and Tips] for questions, problems, etc. [Tclhttpd as a Unix service], [Tclhttpd as a Windows service] and [Tclhttpd as a starkit] show how to deploy Tclhttpd. [Starting Tclhttpd in a slave interpreter] discusses embedding Tclhttpd into other applications, web-enabling them. [minimal tclhttpd] discusses techniques for cutting down Tclhttpd to bare bones. There's also a 250-line form of Tclhttpd called mini [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclhttpd/tclhttpd/bin/mini/]. Mini-Tutorial: Content type and file extension - [Tclhttpd and content type] [aku]'s Low-level documentation (written in [doctools]) for [httpd.tcl], the protocol engine. Other macro processing s/w can be found under [Template And Macro Processing]. ---- When trying to run Tclhttpd under [Windows XP] I get the following error, no matter if I use the [Starkit] or the normal distribution: could't open "/tmp/tclhttpd.default": no such file or directory [WJR] A quick fix is to create a '''tmp''' folder on the root of the drive where TclHttpd is installed (e.g. c:\tmp). This is a bug, on [Windows] tclhttpd.default should probably be put in the the Windows equivalent (e.g. c:\temp). I reported the bug. [CMcC] This bug has been fixed for months, as noted in the sf bug report. [WJR] Are you referring to bug ID 1030323? This problem still occurs in 3.5.1. Should I try the CVS version? [CMcC] definitely ... there's a nightly snapshot at the top of this page. [Peter Newman] 17 December 2004: This bug may have been removed (from the CVS) months ago, but it's still in the latest downloadable versions (source and tclkit, at least). And affects Windows 98SE (and presumably every other version of Windows,) too. It generates a fatal error, thus preventing the latest downloadable versions of TclHttpd from even starting (under Windows). But you can easily fix it by making the changes shown on the sourceforge CVS in:- tclhttpd/lib/auth.tcl Revision 1.21 Diff to previous 1.20 and; Revision 1.20 Diff to previous 1.19 The easiest way to do this to to just download Revision 1.21, and replace your existing '''auth.tcl''' with it. ---- [dzach] 2006-9-1 I can't get a .tml file to render a utf-8 page right using the '''Doc_Dynamic''' method of tclhttpd. The following test-utf8.html file is validated against the W3C validator: utf-8 test

Good morning in Greek:
Καλημέρα!

Internationa Phonetic Association (IPA) phonetics
writer 'ɻaɪɾɚ

Then I prepend a '''Doc_Dynamic''' line and change it to test-utf8.tml, to be rendered by the template feature of tclhttpd. The greek and IPA parts appear garbage in the browser. If I take out the '''Doc_Dynamic''' line, and therefore allow tclhttpd to cache the html page, the browser shows the non ASCII portions correctly. More to that: if I do an '''encoding convertto utf-8''' with the page content, I get the correct display. So obviously, a conversion to utf-8 has to be made somewhere, before the result is sent to the client, when using the '''Doc_Dynamic''' template technics. I am looking for an answer in the code, but if anyone knows better... (A day later) If my observations of the problem are correct and not a result of my particular tcl setup, it seems that the issue might be in the processing done in the slave interpreter.The place where the processed template is returned is the end of the ''TemplateInstantiate'' proc. By converting the contents to utf-8, my problem seems to be solved (not fully tested it though). Look for the code: set dynamic [interp eval $interp {uplevel #0 {set page(dynamic)}}] if {!$dynamic} { # Cache the result catch {file delete -force $htmlfile} if {[catch {open $htmlfile w} out]} { set dynamic 1 Log $sock "Template" "no write permission" } else { puts -nonewline $out $html close $out } } return $html } Substitute the return command with: # # return $html # return [encoding convertto utf-8 $html] } This of course is a hack, and it propably works only for utf-8, but not for the numerous 8-bit encodings supported either by tcl or the browser. Anyway, in the absense of a proper solution, it may be useful to someone else too. ---- '''User contributions''' * [Matthias Hoffmann - Tcl-Code-Snippets - tclhttpd and cgi-related - CGIFRAME] - Calling arbitrary commandline tools via cgi, showing output as html-page * [ReSourcing Direct Domain procs when changed] - [JBR] ---- As one wag put it, "tclhttpd is the best tcl 7.4 app in existence." ---- [[ [Category Application] | [Category Mailing List] | [Category Package] | [Category Internet] | [Category TclHttpd] ]]