HTTP2 Patch for WWW Servers

Dave_Raggett <dsr@hplb.hpl.hp.com>
From: Dave_Raggett <dsr@hplb.hpl.hp.com>
Message-id: <9304160933.AA12032@manuel.hpl.hp.com>
Subject: HTTP2 Patch for WWW Servers
To: www-talk@nxoc01.cern.ch
Date: Fri, 16 Apr 93 10:33:20 BST
Mailer: Elm [revision: 66.36.1.1]
Most WWW Servers need patching!
===============================

I have just finished upgrading our WWW servers and clients to
use HTTP2 and ran across a problem in using existing servers:

The new format:

    GET path HTRQ/V1.0\r\n

screws existing virtually all existing WWW servers which see the
version number as part of the path string. So you get errors like:

    a)  an empty file - the server simply gave up and closed the connection

    b)  a message to the effect: can't open file "foo.html HTRQ/V1.0"

The patch needed is very simple - you just need to check for a space
chararacter in the path string and if present, null it out!

        void http2_patch(char *path)
        {
            char *p;

            p = strchr(path, ' ');

            if (p)
                *p = '\0';
        }

Most of the CERN servers do accept the new format, with the exception
of the WAIS gateway - on info.cern.ch:8001 which needs patching.

A major motivation behind the new format is to allow servers to return
machine readable status information. This was a major omission with the
older protocol.

We have used the Authorization: field in HTRQ/V1.0 to give clients access
to private information using a username/password approach in the same
vein as rlogin, with support for /etc/hosts.equiv and .rhosts. We expect
to take advantage of the ChargeTo: field soon to cross-charge for selected
information.

Dave Raggett,

-----------------------------------------------------------------------------
Hewlett Packard Laboratories,           +44 272 228046
Bristol, England                        dsr@hplb.hpl.hp.com