From clamav-devel-bounces@lists.clamav.net  Wed Jan 26 22:35:07 2005
Return-Path: <clamav-devel-bounces@lists.clamav.net>
X-Original-To: list@krisma.oltrelinux.com
Delivered-To: list@krisma.oltrelinux.com
Received: from localhost (krisma [127.0.0.1])
	by mail.oltrelinux.com (Postfix) with ESMTP id 0CA6A11AE46
	for <list@krisma.oltrelinux.com>; Wed, 26 Jan 2005 22:35:07 +0100 (CET)
Received: from mail.oltrelinux.com ([127.0.0.1])
	by localhost (krisma.oltrelinux.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 03823-06 for <list@krisma.oltrelinux.com>;
	Wed, 26 Jan 2005 22:35:01 +0100 (CET)
Received: from aj.catt.com (aj.catt.com [64.18.103.6])
	by mail.oltrelinux.com (Postfix) with ESMTP id 445C011AE51
	for <list@krisma.oltrelinux.com>; Wed, 26 Jan 2005 22:35:01 +0100 (CET)
Received: from aj.catt.com (localhost [127.0.0.1])
	by aj.catt.com (Postfix) with ESMTP id 5F82915603F;
	Wed, 26 Jan 2005 16:34:52 -0500 (EST)
Received: from main.gmane.org (main.gmane.org [80.91.229.2])
	by aj.catt.com (Postfix) with ESMTP id 8171D156025
	for <clamav-devel@lists.clamav.net>;
	Wed, 26 Jan 2005 16:34:46 -0500 (EST)
Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1Ctuo9-0001eY-00
	for <clamav-devel@lists.clamav.net>; Wed, 26 Jan 2005 22:34:37 +0100
Received: from pd9e2d9ee.dip.t-dialin.net ([217.226.217.238])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <clamav-devel@lists.clamav.net>; Wed, 26 Jan 2005 22:34:37 +0100
Received: from sstrickroth by pd9e2d9ee.dip.t-dialin.net with local (Gmexim
	0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <clamav-devel@lists.clamav.net>; Wed, 26 Jan 2005 22:34:37 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: clamav-devel@lists.clamav.net
From: "Sven Strickroth" <sstrickroth@gym-oha.de>
Date: Wed, 26 Jan 2005 22:34:28 +0100
Lines: 62
Message-ID: <ct92d3$gu5$1@sea.gmane.org>
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: pd9e2d9ee.dip.t-dialin.net
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Subject: [Clamav-devel] freshclam-protocol-bug with buggy proxy-servers
X-BeenThere: clamav-devel@lists.clamav.net
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: ClamAV Development <clamav-devel@lists.clamav.net>
List-Id: ClamAV Development <clamav-devel.lists.clamav.net>
List-Unsubscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel>,
	<mailto:clamav-devel-request@lists.clamav.net?subject=unsubscribe>
List-Post: <mailto:clamav-devel@lists.clamav.net>
List-Help: <mailto:clamav-devel-request@lists.clamav.net?subject=help>
List-Subscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel>,
	<mailto:clamav-devel-request@lists.clamav.net?subject=subscribe>
Sender: clamav-devel-bounces@lists.clamav.net
Errors-To: clamav-devel-bounces@lists.clamav.net
X-Spam-Status: No, hits=1.4 tagged_above=0.5 required=5.0
	tests=PRIORITY_NO_NAME, UPPERCASE_25_50
X-Spam-Level: *

Hi,

freshclam 0.81 prints:
"ClamAV update process started at Wed Jan 26 22:24:32 2005
Connecting via 192.168.0.1
Reading CVD header (main.cvd): ERROR: Malformed CVD header detected.
ERROR: Can't read main.cvd header from db.de.clamav.net (IP: 192.168.0.1)
Trying again in 5 secs..."

This issue appears because of the new If-Modified-Since-function in 
combination with a "malformed" answer from some proxy-servers. Two examples:
"GET http://db.de.clamav.net/main.cvd HTTP/1.1
Host: db.de.clamav.net
User-Agent: clamav/0.81
Connection: close
Range: bytes=0-511
If-Modified-Since: Wed, 26 Jan 2005 20:52:11 GMT

HTTP/1.0 304 Use cached copy"

"GET http://db.de.clamav.net/main.cvd HTTP/1.1
Host: db.de.clamav.net
User-Agent: clamav/0.81
Connection: close

HTTP/1.0 200 OK
Date: Wed, 26 Jan 2005 21:19:06 GMT
Server: Apache
Last-Modified: Fri, 14 Jan 2005 20:55:12 GMT
ETag: "a295a-189e41-41e831b0"
Accept-Ranges: bytes
Content-Length: 1613377
Content-Type: text/plain

ClamAV-VDB:14 Jan 2005 21-46..."

FreshClam uses HTTP/1.1 but the answer is HTTP/1.0

I attached a small patch, which solves this issue.

Greetings Sven 


begin 666 freshclam-http10.patch
M+2TM(&-L86UA=BTP+C@Q+6]R:6<O9G)E<VAC;&%M+VUA;F%G97(N8PDR,# U
M+3 Q+3(V(#(Q.C0Y.C X+C P,# P,# P," K,#$P, HK*RL@8VQA;6%V+3 N
M.#$O9G)E<VAC;&%M+VUA;F%G97(N8PDR,# U+3 Q+3(V(#(R.C(P.C0W+C P
M,# P,# P," K,#$P, I 0" M-38W+#$S("LU-C<L,3,@0$ *( ER971U<FX@
M3E5,3#L*(" @("!]"B *+2 @("!I9B@H<W1R<W1R*&)U9F9E<BP@(DA45% O
M,2XQ(#0P-"(I*2 A/2!.54Q,*2![( HK(" @(&EF*"AS=')S='(H8G5F9F5R
M+" B2%144"\Q+C$@-# T(BDI("$]($Y53$P@?'P@*'-T<G-T<BAB=69F97(L
M(")(5%10+S$N," T,#0B*2D@(3T@3E5,3"D@>R *( EM<')I;G1F*") 0U9$
M(&9I;&4@;F]T(&9O=6YD(&]N(')E;6]T92!S97)V97)<;B(I.PH@"7)E='5R
M;B!.54Q,.PH@(" @('T*( H@(" @("\J(&-H96-K('=H971H97(@=&AE(')E
M<V]U<F-E(&ES('5P+71O+61A=&4@*B\*+2 @("!I9B@H<W1R<W1R*&)U9F9E
M<BP@(DA45% O,2XQ(#,P-"(I*2 A/2!.54Q,*2![( HK(" @(&EF*"AS=')S
M='(H8G5F9F5R+" B2%144"\Q+C$@,S T(BDI("$]($Y53$P@?'P@*'-T<G-T
M<BAB=69F97(L(")(5%10+S$N," S,#0B*2D@(3T@3E5,3"D@>R *( H@"2II
A;7,@/2 P.PH@"6UP<FEN=&8H(D]+("A)35,I7&XB*3L*
`
end


_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel

