SPUG: HTTP Headers

Parr, Ryan Ryan.Parr at wwireless.com
Tue Dec 11 11:05:05 CST 2001


I'm currently moving the intranet site I work on to be completely database
based. However, I'm running into a snag with delivering documents to the
user. Rather, delivering documents other than HTML to the user.

If I have my CGI load a word doc that's stored in the database, and send it
to the user with the appropriate mime type, the browser can handle it
appropriately. Unfortunately though, I have no way to specify a filename for
the content. So instead of receiving an Open/Save dialog for CMS_SOP.doc
they receive an Open/Save dialog for /cgi-bin/loadpage.cgi?id=334, or the
browser loads the word doc with the filename /cgi-bin/loadpage.cgi?id=334.

I haven't been able to find any standard HTTP headers that deal with this
scenario, nor any IE specific extension headers. I'm in a controlled
environment so everyone has IE 4+. This approach to document delivery seems
natural enough to me that I'm sure a thousand developers before me have
attempted it, certainly some with success. Have any of you?

-- Ryan Parr

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/





More information about the spug-list mailing list