When multiple file buckets exist in a brigade that is to be sent out and emulate_sendfile() is used to do it, some buckets may be misaligned (i.e. the output will appear garbled). The issue is related to a missing apr_file_seek() call when offset is 0 (i.e. emulate_sendfile() incorrectly assumes that it is at the beginning of the file). The patch that fixes that problem is attached.
Created attachment 10966 [details] Fix for the multiple file bucket problem in emulate_sendfile()
This was committed to 2.1 by FirstBill and has received enough votes for backport to 2.0 as soon as somebody gets to it. Thanks! Cliff
fixed in stable branch as well as HEAD