@@ -21,19 +21,17 @@ import System.Posix.Types
2121
2222----------------------------------------------------------------
2323
24−defaultSendFile :: Socket -> SendFile
24+defaultSendFile :: Socket -> Buffer -> BufSize -> (ByteString -> IO ()) -> SendFile
2525#ifdef SENDFILEFD
26−defaultSendFile s fid off len act hdr = case mfid of
27− Nothing -> sendfileWithHeader s path (PartOfFile off len) act hdr
26+defaultSendFile s _ _ _ fid off len act hdr = case mfid of
2827 Just fd -> sendfileFdWithHeader s fd (PartOfFile off len) act hdr
28+ -- never reached, just in case
29+ Nothing -> sendfileWithHeader s path (PartOfFile off len) act hdr
2930 where
3031 path = fileIdPath fid
3132 mfid = fileIdFd fid
3233#else
33−defaultSendFile s fid off len act hdr =
34− sendfileWithHeader s path (PartOfFile off len) act hdr
35− where
36− path = fileIdPath fid
34+defaultSendFile _ = readSendFile
3735#endif
3836
3937----------------------------------------------------------------