SITE
  Documentation
  Download
  License
  Performance
  Mailing List

FACADE
  Documentation
  Download
  License
  Mailing List

STORE
  Overview
  Tools
  Download
  License
  Mailing List

JUNIT EXTENSIONS
  Documentation
  Download
  License

PUBLICFILE
PATCHES

SPARK

AMANDA CD-RW
TAPER

  Overview
  Installation & Usage
  Internals

Publicfile Patches

Peter Conrad, <conrad@tivano.de>
$Id: index.shtml,v 1.10 2003/05/20 10:13:22 conrad Exp $

publicfile consists of an http server and an ftp server. It was written by D. J. Bernstein. Like most of his programs, publicfile is trying to be more secure than many other programs.

Also, like most of his programs, it could be called a little eccentric in that it behaves a lot different than other programs do. It is certainly not a simple drop-in replacement for any other http- or ftp-server.

That's why people have written patches for it (listed here), and that's also why we have written these patches:

publicfile-0.52-gzip-1.patch
This patch enables "Content-Encoding" (gzip). It works as follows:
when a client requests <host>/<file> (via http),
  and the request contains a header "Accept-Encoding" whose value contains the string "gzip",
  and if the file <host>/<file> is retrievable,
  and if the file <host>/<file>.gz is retrievable,
  and if <host>/<file>.gz is not older than <host>/<file>,
then the header line "Content-Encoding: gzip" is added to the response,
  and <host>/<file>.gz is returned instead.
In other words, if there is a compressed copy of the file available, it is returned instead of the uncompressed version, saving some bandwidth.
Update: integrated change by Robert Thille to suppress error message if <file>.gz doesn't exist
publicfile-0.52-http10keepalive.patch
Some (more or less) popular browsers like Netscape-4.x use HTTP/1.0 requests per default. publicfile doesn't support persistent connections for HTTP/1.0 requests, which can mean a big performance hit for these browsers (and for the server as well). This patch enables persistent connections for HTTP/1.0 requests as described in RFC 2616 section 19.6.2.
There are some known problems with older proxy servers. Read the RFC before you apply this patch!
publicfile-0.52-commonlog-2.patch
publicfile writes log information in a format completely different from that of other webservers like apache. This makes it difficult to evaluate the logs using standard tools that expect the files to be in "common logfile format". This patch makes publicfile's httpd write additional log lines in common or combined format. A perl script is included to separate those lines from the original publicfile output.
Update: slight change to make it applyable with the new gzip-1 patch

These patches have been tested together with Giles Lean's "redirect-slash-patch" and Uwe Ohse's "file types" patch. If you want to use all of these, apply them in the following order to the unmodified sources:

  1. http://www.publicfile.org/redirect-slash-patch
  2. http://www.ohse.de/uwe/patches/publicfile-0.52-filetype-diff
  3. publicfile-0.52-gzip-1.patch
  4. publicfile-0.52-http10keepalive.patch
  5. publicfile-0.52-commonlog-2.patch

The commonlog-patch will need some modifications to include the userid if you use Jay Soffian's BasicAuth patch. See http://www.publicfile.org/ for patches not listed here.

Send your comments / improvements / criticism to conrad@tivano.de.


[ t]ivano software gmbh
http://www.tivano.de/