forcing FTP-uploaded files to be of certain types only
Phil Regnauld
regnauld at catpipe.net
Tue Jul 18 13:15:19 UTC 2006
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.
More information about the freebsd-net
mailing list