getHTTP Module - Tcl command to
retrieve binary files via HTTP
AOLserver does not provide a Tcl method for downloading binary files via HTTP. This module implements that functionality (as the Tcl command am_gethttpfile). Source code and makefiles (gnu make and Microsoft VS6 project files) are included. The .zip version includes a precompiled .dll as well (since everyone on NT doesn't have Visual Studio but everyone on Linux has gcc).
First you need to have a compiled copy of the module. If you're using NT the job is already done. On Linux you need to open up the Makefile and alter the paths to reflect your setup. Run "make" and the result should be getHTTPFile.so
Second, copy the compiled module into your AOLserver /bin directory. The compiled module is named getHTTPFile.so (or .dll). For example, cp getHTTPFile.so /usr/local/AOLserver/bin (or copy getHTTPFile.dll /aolserver/bin)
Third, modify your nsd.tcl (or nsd.ini) to load the module and map the parser to the desired file extensions. To load the module add the following line in your ns/server/vserver/module section
ns_param getHTTP getHTTPFile.so
On our test server our modules section now looks like:
ns_section "ns/server/server1/modules" ns_param nssock nssock.so ns_param nscp nscp.so ns_param nslog nslog.so ns_param getHTTP getHTTPFile.so
Fourth and Last, restart your AOLserver.