Annotation of libwww/Library/src/HTResMan.html, revision 2.5

2.1       frystyk     1: <HTML>
                      2: <HEAD>
                      3:   <!-- Changed by: Henrik Frystyk Nielsen, 15-Jul-1996 -->
2.2       frystyk     4:   <TITLE>W3C Sample Code Library libwww Private Request Definition</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
                      7: <H1>
                      8:   Private Response Definition
                      9: </H1>
                     10: <PRE>
                     11: /*
                     12: **     (c) COPYRIGHT MIT 1995.
                     13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
                     16: <P>
                     17: This module is the private part of the response object. It has the functions
                     18: declarations that are private to the Library and that shouldn't be used by
                     19: applications. See also the public part of the declarition in the
                     20: <A HREF="HTResponse.html">HTResponse Module</A>.
                     21: <P>
                     22: This module is implemented by <A HREF="HTResMan.c">HTResMan.c</A>, and it
2.5     ! frystyk    23: is a part of the <A HREF="http://www.w3.org/Library/"> W3C Sample Code
2.1       frystyk    24: Library</A>.
                     25: <PRE>
                     26: #ifndef HTRESMAN_H
                     27: #define HTRESMAN_H
                     28: 
                     29: #include "<A HREF="HTResponse.html">HTResponse.h</A>"
                     30: #include "<A HREF="HTList.html">HTList.h</A>"
                     31: #include "<A HREF="HTFormat.html">HTFormat.h</A>"
                     32: #include "<A HREF="HTAnchor.html">HTAnchor.h</A>"
                     33: #include "<A HREF="HTMethod.html">HTMethod.h</A>"
                     34: #include "<A HREF="HTAABrow.html">HTAABrow.h</A>"
                     35: #include "<A HREF="HTStream.html">HTStream.h</A>"
                     36: #include "<A HREF="HTNet.html">HTNet.h</A>"
                     37: #include "<A HREF="HTMIMPrs.html">HTMIMPrs.h</A>"
                     38: </PRE>
                     39: <P>
                     40: When a request is handled, all kinds of things about it need to be passed
                     41: along together with a request. It is intended to live as long as the request
                     42: is still active, but can be deleted as soon as it has terminated. Only the
                     43: anchor object stays around after the request itself is terminated.
                     44: <PRE>
                     45: struct _HTResponse {
                     46: 
                     47:     int                 hash;
                     48: </PRE>
                     49: <H3>
                     50:   Redirection
                     51: </H3>
                     52: <P>
                     53: If we get a redirection back then we return the new destination for this
                     54: request to the application using this anchor.
                     55: <PRE>
                     56:     HTAnchor *         redirectionAnchor;                /* Redirection URL */
                     57: </PRE>
                     58: <H3>
                     59:   Retry Request After
                     60: </H3>
                     61: <P>
                     62: If we get a response back saying that we have to retry the request after
                     63: a certain amount of time then add this information here. Libwww does not
                     64: retry the request automatically - this is for the application to do.
                     65: <PRE>
                     66:     time_t             retry_after;             /* Absolut time for a retry */
                     67: </PRE>
                     68: <H3>
                     69:   Access Authentication Information
                     70: </H3>
                     71: <P>
                     72: The <CODE>challenge</CODE> and the <CODE>credentials</CODE> entries are use
                     73: by the authentication parsers and generators respectively.
                     74: <PRE>
                     75:     char *             realm;                              /* Current realm */
                     76:     char *             scheme;                            /* Current scheme */
                     77: 
                     78:     HTAssocList *      challenge;         /* Challenge received in response */
                     79: </PRE>
                     80: <H3>
                     81:   Connection Control Directives
                     82: </H3>
                     83: <P>
                     84: This association list is a list of the connection control directives that
                     85: have been received in the response.
                     86: <PRE>
                     87:     HTAssocList *       connection;
                     88: </PRE>
                     89: <H3>
                     90:   Protocol Extension Protocol (PEP) Information
                     91: </H3>
                     92: <P>
                     93: These association lists contain the information that we have received in
                     94: PEP headers in the response.
                     95: <PRE>
                     96:     HTAssocList *      protocol;
                     97:     HTAssocList *      protocol_info;
                     98:     HTAssocList *      protocol_request;
                     99: </PRE>
                    100: <P>
                    101: <H3>
                    102:   Cache Control Directives
                    103: </H3>
                    104: <P>
                    105: This association list is a list of the cache control directives that have
                    106: been received as part of the response. We also keep track of whether the
                    107: response si cachable or not.
                    108: <PRE>
                    109:     BOOL                cachable;
                    110:     BOOL                cached;             /* If anchor has inherited lists */
                    111:     HTAssocList *       cache_control;
                    112: </PRE>
                    113: <H3>
                    114:   Range Requests
                    115: </H3>
                    116: <P>
                    117: We may get a partial response in which case we register the received ranges
                    118: of the resource.
                    119: <PRE>
                    120:     HTAssocList *       byte_ranges;
                    121: </PRE>
                    122: <H3>
                    123:   Variants
                    124: </H3>
                    125: <P>
                    126: The response may be a negotiated response in which case we wanna know. This
                    127: has significance for whether the object is cachable or not.
                    128: <PRE>
                    129:     HTAssocList *       variants;
                    130: </PRE>
                    131: <H3>
                    132:   Content Length
                    133: </H3>
                    134: <P>
                    135: We register the content length as thjis is of importance to all responses.
                    136: The content length is&nbsp;a common way to figure out how many bytes we can
                    137: expect.
                    138: <PRE>
                    139:     long int          content_length;
                    140: </PRE>
                    141: <H3>
                    142:   Content Type
                    143: </H3>
                    144: <P>
                    145: The Content type is important to know as we set of the stream pipe and do
                    146: the format conversion.
                    147: <PRE>
                    148:     HTFormat           content_type;
                    149:     HTAssocList *      type_parameters;    /* Type parameters (charset etc.) */
                    150: </PRE>
                    151: <H3>
                    152:   Content Encoding
                    153: </H3>
                    154: <P>
                    155: We register the content-encoding as it may affect the stream pipe as we set
                    156: it up.
                    157: <PRE>
                    158:     HTList *          content_encoding;
                    159: </PRE>
                    160: <H3>
2.3       frystyk   161:   Transfer Encoding
2.1       frystyk   162: </H3>
                    163: <P>
                    164: The transfer encoding is likewise important when we set up the stream pipe.
                    165: <PRE>
2.4       frystyk   166:     HTList *          transfer_encoding;
                    167: </PRE>
                    168: <H3>
                    169:   Content Transfer Encoding
                    170: </H3>
                    171: <P>
                    172: The content transfer encoding is likewise important when we set up the stream pipe.
                    173: <PRE>
                    174:     HTEncoding         cte;
2.1       frystyk   175: </PRE>
                    176: <H3>
2.3       frystyk   177:   Trailer
                    178: </H3>
                    179: <P>
                    180: The tailers are headers that come at the end
                    181: <PRE>
                    182:     HTAssocList *      trailer;
                    183: </PRE>
                    184: <H3>
2.1       frystyk   185:   Original Reponse Header Values
                    186: </H3>
                    187: <P>
                    188: We store the&nbsp;original headers as they may become useful in many ways
                    189: - for example in lazy parsing.
                    190: <PRE>
                    191:     HTAssocList *      headers;
                    192: </PRE>
                    193: <PRE>
                    194: }; /* End of definition of HTResponse */
                    195: </PRE>
                    196: <P>
                    197: End of Declaration
                    198: <PRE>
                    199: #endif /* HTRESMAN_H */
                    200: </PRE>
                    201: <P>
                    202:   <HR>
                    203: <ADDRESS>
2.5     ! frystyk   204:   @(#) $Id: HTResMan.html,v 2.4 1998/03/05 21:56:23 frystyk Exp $
2.1       frystyk   205: </ADDRESS>
                    206: </BODY></HTML>

Webmaster