Re: impact of move to http/1.0

Charles Henrich (henrich@crh.cl.msu.edu)
Wed, 25 Aug 1993 20:26:21 -0400 (EDT)


>
> 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