HTTP2 Patch for WWW Servers

Dave_Raggett <>
From: Dave_Raggett <>
Message-id: <>
Subject: HTTP2 Patch for WWW Servers
Date: Fri, 16 Apr 93 10:33:20 BST
Mailer: Elm [revision:]
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 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

Dave Raggett,

Hewlett Packard Laboratories,           +44 272 228046
Bristol, England