From owner-freebsd-current Mon Jun 24 09:10:02 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA02645 for current-outgoing; Mon, 24 Jun 1996 09:10:02 -0700 (PDT) Received: from sovcom.kiae.su (sovcom.kiae.su [193.125.152.1]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA02615; Mon, 24 Jun 1996 09:09:43 -0700 (PDT) Received: by sovcom.kiae.su id AA03944 (5.65.kiae-1 ); Mon, 24 Jun 1996 18:58:58 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Mon, 24 Jun 96 18:58:57 +0300 Received: (from ache@localhost) by nagual.ru (8.7.5/8.7.3) id TAA01498; Mon, 24 Jun 1996 19:54:37 +0400 (MSD) Message-Id: <199606241554.TAA01498@nagual.ru> Subject: Re: 'fetch' fixes to conform HTTP standard To: roberto@keltia.freenix.fr (Ollivier Robert) Date: Mon, 24 Jun 1996 19:54:37 +0400 (MSD) Cc: jkh@FreeBSD.org, asami@cs.berkeley.edu, current@FreeBSD.org In-Reply-To: <199606241125.NAA09868@keltia.freenix.fr> from "Ollivier Robert" at "Jun 24, 96 01:25:08 pm" From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (Andrey A. Chernov) X-Class: Fast X-Mailer: ELM [version 2.4ME+ PL22 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > 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 http://www.nagual.ru/~ache/