blob: a3846b31845c49740330893c417889c59a938307 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$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:
*
|