$NetBSD: patch-ag,v 1.2 2007/06/15 23:28:17 wiz Exp $ --- prayer/response.c.orig 2003-04-15 13:00:03.000000000 +0000 +++ prayer/response.c @@ -694,7 +694,12 @@ response_file(struct request *request, } 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: *