Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 1996 19:54:37 +0400 (MSD)
From:      =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (Andrey A. Chernov) <ache@nagual.ru>
To:        roberto@keltia.freenix.fr (Ollivier Robert)
Cc:        jkh@FreeBSD.org, asami@cs.berkeley.edu, current@FreeBSD.org
Subject:   Re: 'fetch' fixes to conform HTTP standard
Message-ID:  <199606241554.TAA01498@nagual.ru>
In-Reply-To: <199606241125.NAA09868@keltia.freenix.fr> from "Ollivier Robert" at "Jun 24, 96 01:25:08 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> It seems that [______ ______] said:
> >   		    return;
> > ! 		if (match (".*200.*success", s) == 0) {
> >   			/* maybe not found, or document w/o header */
> >   			if (match (".*404.*not found", s)) {
> >   				fprintf (stderr, "%s not found\n%s\n", file_to_get, s);
> > --- 539,545 ----
> >   		s[header_len] = 0;
> >   		if (len && (header_len < S))
> >   		    return;
> > ! 		if (match (".*200 +OK", s) == 0) {
> >   			/* maybe not found, or document w/o header */
> 
> I don't think it    is wise to  try  to  match  anything after  the  return
> number. You could put "200 foo bar" and still  conform to the RFC. Anything
> after the code should be ignored IMO.

It is a bit difficult, because whole buffer (header) is searched,
simple 200 can be anywhere in the buffer. It means that header must be
parsed by lines and require much more changes to this code.
BTW, all HTTPDs I saw respond as ... 200 OK

-- 
Andrey A. Chernov
<ache@nagual.ru>
http://www.nagual.ru/~ache/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606241554.TAA01498>