Annotation of libwww/Library/src/HTMIME.html, revision 2.26
2.6 timbl 1: <HTML>
2: <HEAD>
2.24 frystyk 3: <!-- Changed by: Henrik Frystyk Nielsen, 17-Apr-1996 -->
2.26 ! frystyk 4: <TITLE>W3C Sample Code Library libwww MIME/RFC822 Parsers</TITLE>
2.6 timbl 5: </HEAD>
6: <BODY>
2.24 frystyk 7: <H1>
2.25 frystyk 8: MIME Parsers
2.24 frystyk 9: </H1>
2.9 frystyk 10: <PRE>
11: /*
2.13 frystyk 12: ** (c) COPYRIGHT MIT 1995.
2.9 frystyk 13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
2.24 frystyk 16: <P>
17: The MIME parser stream presents a MIME document with a header and possibly
18: a footer. It recursively invokes the format manager to handle embedded formats
19: like MIME multipart. As well as stripping off and parsing the headers, the
20: MIME parser has to parse any weird MIME encodings it may meet within the
21: body parts of messages, and must deal with multipart messages.
22: <P>
23: This module is implemented to the level necessary for operation with WWW,
24: but is not currently complete for any arbitrary MIME message.
25: <P>
2.9 frystyk 26: This module is implemented by <A HREF="HTMIME.c">HTMIME.c</A>, and it is
2.26 ! frystyk 27: a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C Sample Code
2.24 frystyk 28: Library</A>.
2.9 frystyk 29: <PRE>
30: #ifndef HTMIME_H
2.1 timbl 31: #define HTMIME_H
32:
33: #include "HTStream.h"
2.15 frystyk 34: #include "HTFormat.h"
2.6 timbl 35: </PRE>
2.24 frystyk 36: <H3>
37: MIME header parser stream
38: </H3>
39: <P>
40: This stream parses a complete MIME header and if a content type header is
41: found then the stream stack is called. Any left over data is pumped right
42: through the stream.
2.8 frystyk 43: <PRE>
2.20 frystyk 44: extern HTConverter HTMIMEConvert;
2.18 frystyk 45: </PRE>
2.24 frystyk 46: <H3>
47: MIME Header ONLY parser stream
48: </H3>
49: <P>
50: This stream parses a complete MIME header and then returnes HT_PAUSE. It
51: does not set up any streams and resting data stays in the buffer. This can
52: be used if you only want to parse the headers before you decide what to do
53: next. This is for example the case in a server app.
2.18 frystyk 54: <PRE>
2.20 frystyk 55: extern HTConverter HTMIMEHeader;
2.18 frystyk 56: </PRE>
2.24 frystyk 57: <H3>
58: MIME Footer ONLY parser
59: </H3>
60: <P>
2.23 frystyk 61: Parse only a footer, for example after a chunked encoding.
2.18 frystyk 62: <PRE>
2.23 frystyk 63: extern HTConverter HTMIMEFooter;
64: </PRE>
2.25 frystyk 65: <H3>
66: Partial MIME Response parser
67: </H3>
68: <P>
69: In case we sent a <I>Range conditional GET</I> we may get back a partial
70: response. This response must be appended to the already existing cache entry
71: before presented to the user. That is, first we load the cached object and
72: pump it down the pipe and then the new data follows. Only the latter part
73: gets appended to the cache, of course.
74: <PRE>
75: extern HTConverter HTMIMEPartial;
76: </PRE>
2.23 frystyk 77: <PRE>
2.1 timbl 78: #endif
2.8 frystyk 79: </PRE>
2.24 frystyk 80: <P>
81: <HR>
2.22 frystyk 82: <ADDRESS>
2.26 ! frystyk 83: @(#) $Id: HTMIME.html,v 2.25 1996/10/07 02:04:55 frystyk Exp $
2.22 frystyk 84: </ADDRESS>
2.24 frystyk 85: </BODY></HTML>
Webmaster