Re: impact of move to http/1.0

Charles Henrich <henrich@crh.cl.msu.edu>
From: Charles Henrich <henrich@crh.cl.msu.edu>
Message-id: <9308260026.AA00444@crh.cl.msu.edu>
Subject: Re: impact of move to http/1.0
To: www-talk@nxoc01.cern.ch
Date: Wed, 25 Aug 1993 20:26:21 -0400 (EDT)
In-reply-to: <9308250725.AA01751@wintermute.ncsa.uiuc.edu> from "Marc Andreessen" at Aug 25, 93 02:25:01 am
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 889       
Status: RO
>
> I'm becoming concerned about the impending move to HTTP/1.0 compliance
> on behalf of all known clients.  Why?  The following code:
>
>     fields = sscanf(line_buffer, "%20s%d",
>                     server_version,
>                     &server_status);
>
>     if (fields < 2)
>       {            /* HTTP0 reply */
>         ...
>       }
>     else
>       {                 /* HTTP/1.0 reply */
>         ...
>       }
>
> So.... does anyone have any other ideas on how to handle this
> situation?

Yea,

fields = sscanf(line_buffer, "%20s %d", server_version, &server_status);

if(fields == 2 && strcasecmp(server_version, "HTTP/1.0") == 0)
    {
    /* HTTP/1.0 reply */
    }
else
    {
    /* HTTP0 reply */
    }

-Crh

    Charles Henrich     Michigan State University     henrich@crh.cl.msu.edu

    http://rs560.msu.edu:82/afsmsu/user/h/e/henrich/public/web/henrich.html