Commit 643922e9079c2d2b5dd534cda8ca94f43025889c

Michael Herf 2011-08-15T13:39:10

Solaris sendfile: correctly detect amount of data sent Original message: Solaris sendfile seems to fail when sending moderately large (<1GB) files. Not a 32/64 problem, but a buffer problem. Anyone else ever try this? It is definitely broken in http-server.c. It seems to be broken in the following way: When sendfile sends partial data (EAGAIN, would block), "res" is always -1, rather than the amount sent. Here's a patch that reads from the "offset" pointer instead to discover what was sent. This seems to work: