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

Re: converters/decoders to filter stuff out?

From: Filippo Menczer <fil@cs.ucsd.edu>
Date: Tue, 14 Jul 1998 20:53:54 -0700
Message-Id: <v02140b04b1d1cb3a0958@[137.110.58.121]>
To: Henrik Frystyk Nielsen <frystyk@w3.org>
Cc: rik@cs.ucsd.edu, www-lib@w3.org
Thank you very much Henrik,

I had already figured out (3) -- it's not efficient because
we still load the whole file and throw it away via the black
hole converter, rather than just killing the request --
but I see from the mailing list that this is a more complex
issue that you are already aware of.

And (1) in fact takes care of encoding prompts the same way
(through the black hole decoder) which, at least for now,
solves our problem.

Thanks again!
Fil

At 6:43 PM 7/14/98, Henrik Frystyk Nielsen wrote:
>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
>
>        HTAlert_setInteractive(NO);
>
>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
>
>        HTAlert_deleteOpcode(HT_A_PROMPT);
>
>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
>--
>Henrik Frystyk Nielsen,
>World Wide Web Consortium
>http://www.w3.org/People/Frystyk


====================================================
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 Tuesday, 14 July 1998 23:54:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:28 GMT