SPUG: HTTP Headers

Matt Tucker tuck at whistlingfish.net
Tue Dec 11 13:42:21 CST 2001


-- Trevor Leffler <tleffler at u.washington.edu> spake thusly:

> First off, I'm going to ignore that you're storing entire binary docs
> in your DB, rather than letting your web server serve them up via the
> filesystem.  Anywho...
> 
> We came up with one possible solution, which assumes you're using
> Apache.  Create a link URL such as:
> 
> 	/download/CMS_SOP.doc?docid=334
> 
> Since the real filename is in the URL, your browser will use it in
> the "Save" dialog box.
> 
> The /download directory has only a .htaccess file with these contents:
> 
> ErrorDocument 404 /somepath/nph-download.cgi

A better solution to this would be to use the cgi as part of the URL,
rather than repurposing the 404 handling. Instead of:

    /download/CMS_SOP.doc?docid=334

do:

    /somepath/nph-download.cgi/CMS_SOP.doc?docid=334
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20011211/35bc3a89/attachment.bin


More information about the spug-list mailing list