HText_endAppend is not called in HTPlain (RE: About Webbot and other)
Giacomo Fiorentini wrote:
> 2. When in a request I set up the output format to www/present, and
> the request refers to a text/plain content type document, ( if the library
> is well configured.. ) some converters turn on to fulfill the request. Now,
> when using the HText interface, wherefore aren't the HText_endAppend and
> HText_free call, when parsing the document? Perhaps, whether this is a
> mistake or there is a particular reason for this behavior. Can you help me ?
I have also noticed this yesterday (what a coincidence!). In HTMLPresentation
(converter for HTML docs; file HTML.c) HText_endAppend is called in HTML_flush
and HTML_free. In HTPlain (converter for text/plain; file HTPlain.c) HText_endAppend
is not called at all (but HText_beginAppend is). This makes the application which
relies on HText_end/beginAppend calls to behave incorrectly. I think it's a bug in
the library. HText_endAppend calls should be added to the HTPlain_flush and
On the other hand, HText_free shouldn't be called by the library (IMHO). It's the
application task to destroy the hypertext object. This way the application can
implement the memory cache of already rendered objects.
Hope this will help.