Skip to content
/ zipview Public

A simple CGI to browse ZIP archives

License

Notifications You must be signed in to change notification settings

dnknth/zipview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple CGI to browse ZIP archives

This project started as a coding exercise in the Rust programming language. As such, the code style is probably far from perfect.

It provides a simple CGI executable to browse ZIP archives on a HTTP server. The ZIP content is presented like a regular directory, and archive members can be viewed or downloaded. If an index.html file is found in a zipped directory, it is shown instead of the generic directory listing.

No content is ever written to disk, all listing and unzipping operations are done in memory. Therefore, even as a CGI, Zip browsing is reasonably fast.

Example configuration for Apache

ScriptAlias /zipview /usr/lib/cgi-bin/zipview
<Directory "/usr/lib/cgi-bin">
    Require all granted
    Options +ExecCGI
</Directory>

<Directory "/archives/">
    Options Indexes MultiViews SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
    Action application/zip /zipview
</Directory>

Additionally, an XSLT style sheet is expected in /zipview.xslt for pretty directory listings. See htdocs for an example.