W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > May to August 1996

Content negotiation implementations available

From: Koen Holtman <koen@win.tue.nl>
Date: Mon, 5 Aug 1996 23:21:31 +0200 (MET DST)
Message-Id: <199608052121.XAA07712@wsooti04.win.tue.nl>
To: http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
Cc: Koen Holtman <koen@win.tue.nl>
X-Mailing-List: <http-wg@cuckoo.hpl.hp.com> archive/latest/1200

In the past few days, I have coded some experimental implementations
to go along with the new transparent content negotiation draft.  (I
had almost forgotten what fun coding is!)  Both the draft and the
implementations are available under
http://gewis.win.tue.nl/~koen/conneg/ .

I implemented two things: 
 - a transparently negotiated resource
 - conneg-uax, the content negotiating user agent extension.

1) a transparently negotiated resource.

This is a very minimal implementation (as minimal as the draft allows)
consisting of a CGI script short enough to repeat here:


cat - <<'blex'
Status: 300 Multiple Choices
Alternates: {"stats.tables.html" 1.0 {type text/html} {features tables}},
{"stats.html" 0.8 {type text/html}}, {"stats.ps" 0.95 {type
Vary: *
Content-Type: text/html

<title>Multiple Choices for Web Statistics</title>
<h2>Multiple Choices for Web Statistics:</h2>
<li><a href=stats.tables.html>Version with HTML tables</a>
<li><a href=stats.html>Version without HTML tables</a>
<li><a href=stats.ps>Postscript version</a>


This resource (and its variants) can be found at
http://gewis:81/conneg-bin/stats .  Note that, as mentioned in the
draft, some browsers (notably lynx) can't handle the 300 response
without a Location header generated by this script.

2) conneg-uax, the content negotiating user agent extension

This is a software package which can be used to extend existing user
agents with transparent content negotiation capabilities.  The package
contains a complete implementation of the user agent version of the
network negotiation algorithm.  The package is quite small: about 750
lines of perl and awk.

rom the INSTALLATION file:

1. To run conneg-uax, you need a unix box with the following software

 - perl 4
 - awk     (a newer awk implementation which understands func())
 - libwww-perl-0.4
 - (optional) a user agent which is able to use a http proxy.

You can get libwww-perl-0.4 at


rom the README file:

The conneg-uax program is a HTTP/1.0 user agent which supports
transparent content negotiation.  It can be run from the command
line, but it is mainly intended to work as a wrapper around a normal
HTTP/1.0 user agent:

   |Transparently negotiating    |
   |user agent	                 |
   |                             |
   |   ----------------------    |
   |  | Normal user agent    |   |
   |   ----------------------    |
   |         ^                   |
   |         | HTTP/1.0          |
   |         V                   |
   |   ----------------------    |    
   |  | conneg-uax           |<------- preferences/capabilities database
   |   ----------------------    |     (capdb file)
   |         ^                   |
             | HTTP/1.0 + transparent content negotiation
       Proxy caches, if present
       Origin server, maybe with transparently negotiable resources

Seen from the normal user agent, conneg-uax acts as a HTTP/1.0 proxy.

Seen from the origin server, conneg-uax looks like a monolithic user
agent system capable of transparent content negotiation.

A user agent extended with conneg-uax is typically used for
transparent content negotiation experiments, but it can also access
normal, un-negotiated resources.

While conneg-uax is running, the file capdb, which contains the
capabilities and preferences database, can be edited to try out the
results of different user agent profiles.  The file is read whenever a
negotiated resource which generates a 300 (multiple choices) response
is accessed.  Common use is

  1. access a negotiated resource with the user agent
  2. view the result
  3. edit and save the capdb file
  4. press reload in the user agent and view the new result
  5. goto 3.


I mainly made these implementations to verify that the price of
admission for transparent content negotiation is indeed low, and to
provide a framework for future experiments.  I have no immediate plans
to extend these implementations.

Again, all code is available under
http://gewis.win.tue.nl/~koen/conneg/ .

Please send bug reports and questions about the implementations
directly to me, and not to the http-wg mailing list.

Have fun!

Received on Monday, 5 August 1996 14:23:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:40:17 UTC