converters/decoders to filter stuff out?

Suppose I want to accept only html documents and register the
following global converters:

   HTConversion_add(converters, "text/x-http", "*/*",
      HTMIMEConvert, 1.0, 0.0, 0.0);
   HTConversion_add(converters, "text/html", "www/present",
      HTThroughLine, 1.0, 0.0, 0.0);

This will work properly if I get a "text/html" page.
But if I get something else, say an "application/postscript"
document, the library will ask me to save it to a file. Here
is the typical trace:

  MIME header. Content-Type: application/postscript
  Building.... C-T stack from application/postscript to www/present
  StreamStack. Constructing stream stack for application/postscript to
www/present
  StreamStack. NOT FOUND - error!
  Chunkstream. ABORTING...
  Save file... Temporaray file `/tmp/441-12260.ps'
  Please give name of file to save in: (RETURN for [/tmp/441-12260.ps])

How do I avoid this? I want the library to just throw away the
result if it is in ANY format other that the accepted one(s), without
asking anything!

An additional problem occurs if the document is encoded. Suppose
it is gzipped: again, the library will ask me to save it while
I want it to be discarded automatically. For example, even if I
try:

   HTFormat_addCoding("x-gzip", NULL, HTBlackHole, 1.0);

the library will still try to save the file and ask for a file name.
Is there a way (by a decoder or otherwise) to discard ANY encoded
document without asking?

Basically what I need is a filter based on the mime header.
The stream pipe doesn't seem to do the job. Am I missing something?
I have looked all over for this in the library code, docs, and mailing
list but haven't found an answer.

[Linux/w3c-libwww-5.1m]
Please reply by email as I am not subscribing to the list.
Thanks a bunch for any help!


====================================================
Filippo Menczer         http://www.cs.ucsd.edu/~fil/
fil@cs.ucsd.edu         CSE Dept., 0114
Lab:  (619) 453-4364    U. C. San Diego
Fax:  (619) 534-7029    La Jolla, CA 92093-0114, USA
====================================================
Please note future email:  filippo-menczer@uiowa.edu
====================================================

Received on Monday, 13 July 1998 00:23:54 UTC