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

Second, copy the compiled module into your AOLserver /bin directory. The compiled module is named (or .dll). For example, cp /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

On our test server our modules section now looks like:

ns_section "ns/server/server1/modules"
ns_param nssock
ns_param nscp 
ns_param nslog
ns_param getHTTP

Fourth and Last, restart your AOLserver.


getHTTP | ASP-Style ADP Parser | ADPs for AOLserver 2.1

© Copyright 1996-2014 by and Solitex Networks. Legal Notices.
Creative Commons License Articles on this site are licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.