Annotation of libwww/Library/src/HTMulti.html, revision 2.18

2.1       luotonen    1: <HTML>
                      2: <HEAD>
2.15      frystyk     3:   <!-- Changed by: Henrik Frystyk Nielsen,  5-Jun-1996 -->
2.16      frystyk     4:   <TITLE>W3C Sample Code Library libwww Content Negotiation</TITLE>
2.1       luotonen    5: </HEAD>
                      6: <BODY>
2.15      frystyk     7: <H1>
                      8:   Content Negotation
                      9: </H1>
2.4       frystyk    10: <PRE>
                     11: /*
2.8       frystyk    12: **     (c) COPYRIGHT MIT 1995.
2.4       frystyk    13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
2.15      frystyk    16: <P>
                     17: As part of the HTTP content negotiation, a server must be able to match the
                     18: preferences sent by the client in an HTTP request with the possible set of
                     19: documents that it has avaiable for this URL. For example , it may have an
                     20: English and a Danish version in which case it looks at the
                     21: <CODE>Accept-Language</CODE> header and sees what the client prefers. The
                     22: Library has a simple "Match" algorithm for finding the best as specified
                     23: by the HTTP specification. As the content algorithm is part of the File Interface
                     24: then all file access regardless of whether it is from a server or a client
                     25: application will be able to content negotiotion.
                     26: <P>
2.4       frystyk    27: This module is implemented by <A HREF="HTMulti.c">HTMulti.c</A>, and it is
2.17      frystyk    28: a part of the <A HREF="http://www.w3.org/Library/"> W3C Sample Code
2.15      frystyk    29: Library</A>
2.1       luotonen   30: <PRE>
                     31: #ifndef HTMULTI_H
                     32: #define HTMULTI_H
                     33: 
2.11      frystyk    34: #include "HTReq.h"
2.18    ! vbancrof   35: 
        !            36: #ifdef __cplusplus
        !            37: extern "C" { 
        !            38: #endif 
2.15      frystyk    39: </PRE>
                     40: <P>
                     41: This function is used when the best match among several possible documents
                     42: is to be found as a function of the accept headers sent in the client request.
                     43: <H2>
                     44:   Set the default Welcome page
                     45: </H2>
                     46: <P>
                     47: Set default file name for welcome page on each directory.
                     48: <PRE>extern void HTAddWelcome (char * welcome_name);
                     49: </PRE>
                     50: <H2>
                     51:   Content Negotiation Algorithm
                     52: </H2>
                     53: <P>
                     54: This function looks for a set of <A HREF="HTBind.html">bindings</A> between
                     55: a set of possible objects to be served on a request on the local file system.
                     56: <PRE>
2.12      frystyk    57: extern char * HTMulti (HTRequest *     req,
                     58:                      char *            path,
                     59:                      struct stat *     stat_info);
2.15      frystyk    60: </PRE>
                     61: <PRE>
2.18    ! vbancrof   62: #ifdef __cplusplus
        !            63: }
        !            64: #endif
        !            65: 
2.1       luotonen   66: #endif /* HTMULTI_H */
                     67: </PRE>
2.15      frystyk    68: <P>
                     69:   <HR>
2.14      frystyk    70: <ADDRESS>
2.18    ! vbancrof   71:   @(#) $Id: HTMulti.html,v 2.17 1998/05/14 02:10:46 frystyk Exp $
2.14      frystyk    72: </ADDRESS>
2.15      frystyk    73: </BODY></HTML>

Webmaster