From owner-freebsd-net@FreeBSD.ORG Tue Jul 18 13:15:19 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC4FB16A4E8; Tue, 18 Jul 2006 13:15:19 +0000 (UTC) (envelope-from regnauld@catpipe.net) Received: from moof.catpipe.net (moof.catpipe.net [195.249.214.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A0E843D66; Tue, 18 Jul 2006 13:15:16 +0000 (GMT) (envelope-from regnauld@catpipe.net) Received: from localhost (moof.catpipe.net [195.249.214.130]) by localhost.catpipe.net (Postfix) with ESMTP id 4115463464C; Tue, 18 Jul 2006 15:15:15 +0200 (CEST) Received: from moof.catpipe.net ([195.249.214.130]) by localhost (moof.catpipe.net [195.249.214.130]) (amavisd-new, port 10024) with ESMTP id 68061-09; Tue, 18 Jul 2006 15:15:14 +0200 (CEST) Received: from vinyl.catpipe.net (vinyl.catpipe.net [195.249.214.189]) by moof.catpipe.net (Postfix) with ESMTP id 70F89634641; Tue, 18 Jul 2006 15:15:13 +0200 (CEST) Received: by vinyl.catpipe.net (Postfix, from userid 1006) id 375CA78C31; Tue, 18 Jul 2006 15:11:25 +0200 (CEST) Date: Tue, 18 Jul 2006 15:11:25 +0200 From: Phil Regnauld To: Brian Candler Message-ID: <20060718131124.GB75090@catpipe.net> References: <200607171306.01882.mi+mx@aldan.algebra.com> <20060718125547.GB26642@uk.tiscali.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060718125547.GB26642@uk.tiscali.com> X-Operating-System: FreeBSD 6.1-PRERELEASE i386 Organization: catpipe Systems ApS User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at catpipe.net Cc: Mikhail Teterin , isp@freebsd.org, net@freebsd.org Subject: Re: forcing FTP-uploaded files to be of certain types only X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2006 13:15:19 -0000 Brian Candler (B.Candler) writes: > How wedded are you to FTP? If this was a HTTP 'PUT' then a simple CGI could > read in 100 bytes, check it is compressed (e.g. with libmagic), then copy > through the rest of the file. The result from the PUT can be a HTML page > saying "all OK" or "please compress your data first" A reverse FTP proxy (squid might or might not support FTP proxying on "PUT", to be checked) with an external handler. Around 50 lines of Perl ought to do the trick.