File:  [Public] / libwww / Library / src / HTMulti.html
Revision 2.17: download - view: text, annotated - select for diffs
Thu May 14 02:10:46 1998 UTC (26 years ago) by frystyk
Branches: MAIN
CVS tags: repeat-requests, before_webdav, Release-5-4-0, Release-5-3-1, Release-5-2-8, Release-5-2-6, Release-5-2, Release-5-1m, HEAD, Before-New-Trace-Messages, Amaya_2_4, Amaya-6-3, Amaya-6-1, Amaya-5-2, Amaya-4-3-2, Amaya-4-3-1, Amaya-4-3, Amaya-4-1-2, Amaya-4-1-0, Amaya-4-0-0, Amaya-3-2-1, Amaya-3-2, Amaya
Changing old pub/WWW links

<HTML>
<HEAD>
  <!-- Changed by: Henrik Frystyk Nielsen,  5-Jun-1996 -->
  <TITLE>W3C Sample Code Library libwww Content Negotiation</TITLE>
</HEAD>
<BODY>
<H1>
  Content Negotation
</H1>
<PRE>
/*
**	(c) COPYRIGHT MIT 1995.
**	Please first read the full copyright statement in the file COPYRIGH.
*/
</PRE>
<P>
As part of the HTTP content negotiation, a server must be able to match the
preferences sent by the client in an HTTP request with the possible set of
documents that it has avaiable for this URL. For example , it may have an
English and a Danish version in which case it looks at the
<CODE>Accept-Language</CODE> header and sees what the client prefers. The
Library has a simple "Match" algorithm for finding the best as specified
by the HTTP specification. As the content algorithm is part of the File Interface
then all file access regardless of whether it is from a server or a client
application will be able to content negotiotion.
<P>
This module is implemented by <A HREF="HTMulti.c">HTMulti.c</A>, and it is
a part of the <A HREF="http://www.w3.org/Library/"> W3C Sample Code
Library</A>
<PRE>
#ifndef HTMULTI_H
#define HTMULTI_H

#include "HTReq.h"
</PRE>
<P>
This function is used when the best match among several possible documents
is to be found as a function of the accept headers sent in the client request.
<H2>
  Set the default Welcome page
</H2>
<P>
Set default file name for welcome page on each directory.
<PRE>extern void HTAddWelcome (char * welcome_name);
</PRE>
<H2>
  Content Negotiation Algorithm
</H2>
<P>
This function looks for a set of <A HREF="HTBind.html">bindings</A> between
a set of possible objects to be served on a request on the local file system.
<PRE>
extern char * HTMulti (HTRequest *	req,
		      char *		path,
		      struct stat *	stat_info);
</PRE>
<PRE>
#endif /* HTMULTI_H */
</PRE>
<P>
  <HR>
<ADDRESS>
  @(#) $Id: HTMulti.html,v 2.17 1998/05/14 02:10:46 frystyk Exp $
</ADDRESS>
</BODY></HTML>

Webmaster