05/15/2003: Zip Http Handler
This tool (provided with source) is an IHttpHandler sample that, once installed
on an Internet Information Server, allows client browsers to browse .Zip files
seamlessly.
Directories in the ZIP file are shown (by default - this setting can be
switched off) the same way that IIS shows "real" directories. If the users
browses any file in the .Zip archive file, the file will be downloaded
naturally (with proper handling of Last-Modified Http headers).
This handler can also use a cache directory to speed things up.
For reading .ZIP files, it is based on the famous http://www.zlib.org
accessed through P/Invoke call (it is actually a special version I have very
slightly modified that does not force us to use UNSAFE C# compilation. I can
provide the modified source for those who would like to have it). By the way,
the code provides a full blown unzip C# interface that can be reused in non
HTTP contexts. Updating and creating .ZIP file is not handled, only reading.
|