Re: a question about converter

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
 le
> 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, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Monday, 1 April 1996 15:12:21 UTC