Re: a question about converter
To: Jiang Tao <email@example.com>
Subject: Re: a question about converter
From: Henrik Frystyk Nielsen <firstname.lastname@example.org>
Date: Mon, 01 Apr 1996 15:12:18 -0500
From email@example.com Mon Apr 1 15: 12:21 1996
Reply-To: Henrik Frystyk Nielsen <firstname.lastname@example.org>
X-Authentication-Warning: anansi.w3.org: Host frystyk@localhost didn't use HELO protocol
X-Mailer: exmh version 1.6.2 7/18/95
Jiang Tao writes:
> Henrik Frystyk Nielsen wrote:
> > parser. As the MIME header gets parsed, the MIME parser finds out the "true
> > media type of the MIME body and then calls the stream stack again. What are
> > the symptoms? Do you have a trace of the line mode browser?
> Thank you, I have solved the problem. I registered three converters:
> HTTPStatus_new, MIMEParser and HTXParse. I find that HTTPStatus_new will hand
> the data from http server first which always have the type "text/x-http",
> then call stream stack, and pass data to MIMEParse, which will analyse
> the MIME header, get the content type (such as "text/html, image/gif etc"),
> and remove the MIME header from the data and call stream stack again,
> then pass it to HTXParse where I can process the data according to
> its content type.
> So suppose we registered many converters including HTTPStatus_new
> and MIMEParse, then HTTPStatus_new and MIMEParse will always be called
> first, then the best match converter will be called according to the
> input format, output format and quality factor.
> Is my understanding right?
Yes - and remember that as HTTPStatus_new() and MIMEParse() are also
converters you can easily modify these as well by simply registrering your own
MIME parser, for example.
Henrik Frystyk Nielsen, <email@example.com>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA