Permalink
Browse files

use sendfile if possible. Added missing overload

svn path=/branches/mono-2-6/xsp/; revision=142708
  • Loading branch information...
gonzalop committed Sep 27, 2009
1 parent 7c8176f commit 9207752eaf3decae5d9047b373397b60c72acfdc
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/Mono.WebServer/XSPWorkerRequest.cs
@@ -730,6 +730,13 @@ public override bool IsSecure ()
return secure;
}
+ public override void SendResponseFromFile (string filename, long offset, long length)
+ {
+ using (FileStream fs = File.OpenRead (filename)) {
+ SendResponseFromFile (fs.Handle, offset, length);
+ }
+ }
+
public override void SendResponseFromFile (IntPtr handle, long offset, long length)
{
if (secure || no_libc || (tried_sendfile && !use_sendfile)) {

0 comments on commit 9207752

Please sign in to comment.