Project

General

Profile

Bug #1675

network_freebsd_sendfile does not handle EAGAIN or EINTR on file chunks (patch)

Added by Anonymous over 8 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Missing in 1.5.x:

Description

If a single call is writing a memory chunk followed by a file chunk, the memory chunk may fill the kernel buffer, and the file chunk's sendfile() will return EAGAIN. If no data was written from the chunk at all, the "r 0" case would return with -2. Work around by disabling the "r 0" case for non-fatal sendfile() errors.

This was causing pages to not display images randomly. It wouldn't show up as an error in FF, because the headers in the memory chunk would be received, and it would see the image as a 0-byte successful file.

Also, EINTR is not handled. If the writev case needs this, the sendfile one probably does, too.

-- petopeto

network_freebsd_sendfile.diff View - -- petopeto (588 Bytes) Anonymous, 2008-05-27 01:11

Associated revisions

Revision c1662bcf (diff)
Added by stbuehler over 8 years ago

Handle EAGAIN and EINTR for freebsd sendfile (#1675)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2256 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1 Updated by stbuehler over 8 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2256

Also available in: Atom