Re: MIME Parsing

Mark Secrist wrote:

>  I am looking into using the libwww library to perform some file and
>MIME parsing related operations from the perspective of a helper
>application launched by the Netscape browser.  The intent of this
>helper app is to take the content (which will be a multipart document)
>returned by a cgi-bin and extract the individual components into
>files.  After spending some time looking at the source and the
>documentation, I'm not even sure this is what the library was intended

Using the libwww for this looks like tremendous overkill - at least if
I understand your brief description correctly.  Your app is not going
to interact with any network protocols directly, but just with the
filesystem, right?  And it seems it needs some knowledge of MIME (I assume
you mean a MIME multipart/* type when you write multipart), but not of
HTTP or HTML.  There are some parts on the library that deal with what
you want - but unless I misunderstand completely, you may be better
off with using some code that has been written for mail mime parsers
(metamail etc.).

>Given this, I have two questions:
>1. Can I accomplish the above goal using libwww?

Probably, but you may spend more time throwing things away that you don't
need (after first figuring out what they are) than you would spend 
starting from zero...

>2. If so, what components of the library must I use?

You should probably look in HTMIME.c and HTBound.c for parsing of 
MIME multipart types, HTMulpar.c for generating them.

  Klaus Weide

>               Mark Secrist
>               AT&T:       (970) 229-7490
>               TELNET:     1-229-7490
>               TELNET FAX: 1-229-2961
>               EMAIL:      msecrist@fc.hp.com
>                           3404 East Harmony Road
>                           Fort Collins, Colorado 80525