httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Schaumann <jscha...@netmeister.org>
Subject [users@httpd] Re: apache 2.4 directory autoindex corrupted
Date Tue, 27 Oct 2015 02:41:26 GMT
Jan Schaumann <jschauma@netmeister.org> wrote:
 
> I just upgraded apache 2.2 to apache 2.4.  After the upgrade, my
> autoindex directory listings show up as corrupted strings (see
> https://www.netmeister.org/t/ for an example).  All other content
> serving appears to work fine.

It turns out I was wrong.  All other content gets appended null bytes
until the size is a multiple of 2K, which happens to be my file system's
fragsize.  It seems, somehow apache is getting the wrong filesize for
all files and directories such that instead of getting the actual
filesize, it gets the filesize in blocks:

$ echo foo > f
$ ls -ls f
4 -rw-r--r--  1 jschauma  users  4 Oct 26 22:32 f
$ curl -s https://www.netmeister.org/tmp/f | hexdump
0000000 66 6f 6f 66 6f 6f 0a 00 00 00 00 00 00 00 00 00
0000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000800
$ dd if=/dev/urandom of=f count=2047 bs=1 >/dev/null 2>&1
$ ls -ls f
4 -rw-r--r--  1 jschauma  wheel  2048 Oct 26 22:39 f
$ curl -s https://www.netmeister.org/tmp/f | hexdump | tail -3
00007e0 ed ea cc 28 a5 1f f5 ce 9c ee 6f 1c 4b f7 14 49
00007f0 12 4f 76 ee 3b 87 3e 60 47 a3 ba 7e 8a 1a 2e 00
0000800
$ dd if=/dev/urandom of=f count=2049 bs=1 >/dev/null 2>&1
$ ls -ls f
8 -rw-r--r--  1 jschauma  wheel  2049 Oct 26 22:40 f
$ curl -s https://www.netmeister.org/tmp/f | hexdump | tail -4
0000800 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0001000
$ 

Any idea how this might happen?

-Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message