W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1998

Re: converters/decoders to filter stuff out?

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Tue, 14 Jul 1998 18:43:55 -0400
Message-Id: <>
To: fil@cs.ucsd.edu (Filippo Menczer), www-lib@w3.org
Cc: fil@cs.ucsd.edu
At 21:23 7/12/98 -0700, Filippo Menczer wrote:
>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);
>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!

You can do several things:

1) You can put the libwww into non-interactive mode by calling


2) You can unregister the file name prompt handler. These handlers are
normally registered by the profiles when calling the HTAlert_init()
function. You can unregister the handler for the op-code HT_A_PROMPT by
doing something like


3) You should also be able to register a blackhole stream which does
exactly what the name says - it swallows data:

   HTConversion_add(c, "*/*", "www/present", HTBlackHoleConverter, 0.3,
0.0, 0.0);

but that will not take care of the encoding prompts.

Henrik Frystyk Nielsen,
World Wide Web Consortium
Received on Tuesday, 14 July 1998 18:43:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC