Broken sendfile() and the advantage of using wget

While working on the Live CD for Koha, I noticed that once in the Live CD environment, Apache served dynamic (perl) pages perfectly, but all static content (CSS files, images, etc) seemed to be truncated at 0 bytes (though I could see that their sizes were in the range of kilobytes from the directory listing provided by Apache). The error log did not indicate anything, nor did the access log. I fired up Xterm, and ran wget on a static page. Wget reported:

Connection closed at byte 0

After some googling, it turned out that there is something broken with sendfile() in the Live CD I was working on. I added EnableSendfile Off at the end of httpd.conf, and after that, things worked out perfectly. If someone is interested, more information on the EnableSendfile directive is available in the Apache documentation.

Commentary

Leave a response »

Trackbacks

  1. cdcff2ea4859…

    cdcff2ea4859c676c5f2…

    cdcff2ea4859

Leave a comment, a trackback from your own site or subscribe to an RSS feed for this entry. Trackback URL for this entry Comments feed for this entry

Leave a response

Leave a URL

Preview