85e50a7d96
* Apparently "mutex" is already claimed by a system header on Solaris. * File locking on Linux (probably other operating systems) is pretty dumb when lots of processes are trying to lock a single file for serialisation: all of the processes are woken each time that the file is unlocked. Most of the process will simply loop inside the kernel and attempt to lock again. Presumably this approach makes nonblocking locks and EINTR easier to do, but it does mean that you can get occasional load average spikes. Add MUTEX_SEMAPHORE to implement System V semaphore based lock, which does not have this problem in Linux. Warning: System V semaphores are a finite resource, and they are not released automatically. See: prayer-sem-prune. * Quotas now reported in MBytes rather than KBytes. * Add download links for text/html and text/plain attachments * Fix bug with body->type TYPEMESSAGE: c-client API very poorly documented :( * Strip out common HTML entity encodings that might be used in HREFs with text/html attachments. * Fix mydb_db3.c to work with DB4. * Integrate into Tony's funky packaging system for Hermes and PPSW. * Add interface to automatic spam folder pruning utility that I wrote for Cyrus (controlled through special Sieve files). * Fix uploads where mailboxes contain NUL characters (translate to space?) * Assorted minor bugfixes * Fix nasty /redirect bug that I managed to introduce by switching from url_encode to canon_encode to work around bug in Opera. Missing a url_encode: infinite loop from dumb UAs :(. Otherwise identical to 1.0.9. * Few minor bug fixes, covered in CVS history. pkgsrc changes: * Rename the source rc.d script in the default RCD_SCRIPTS style. * Respect ${VARBASE}. * Avoid the DB_VERB_CHKPOINT flag with latest db4 (where it's been removed). * Patch from jdc@ for 64-bit big-endian hosts. XXX rc.d script doesn't stop all the prayer slaves
19 lines
685 B
Text
19 lines
685 B
Text
$NetBSD: patch-ag,v 1.1 2005/01/09 00:07:47 schmonz Exp $
|
|
|
|
--- prayer/response.c 2003-04-15 14:00:03.000000000 +0100
|
|
+++ prayer/response.c 2005-01-05 18:32:01.000000000 +0000
|
|
@@ -694,7 +694,12 @@
|
|
} else
|
|
bputs(b, "Content-Type: text/plain" CRLF);
|
|
|
|
- bprintf(b, "Content-Length: %lu" CRLF, sbuf.st_size);
|
|
+ /* Hack: cast sbuf.st_size to long here as we are only dealing
|
|
+ * with small files. Otherwise, we will send "Content-Length: 0"
|
|
+ * for the images from big-endian hosts where st_size is 64 bits,
|
|
+ * which confuses browsers.
|
|
+ */
|
|
+ bprintf(b, "Content-Length: %lu" CRLF, (long)sbuf.st_size);
|
|
|
|
/* Following stolen from Apache:
|
|
*
|
|
|