title: res.sendFile does not work
body: <p>I am using Express 4.13, and I met some problems when I  tried to serve the files:</p>
  
  <pre><code>function doServeFile(name, fullpath, res, download) {
      if (fullpath) {
          if (download)
              res.download(fullpath, name);
          else {
              res.sendFile(fullpath, {}, function (err) {
                  console.info(err);
              });
          }
      }
      else {
          res.status(404);
      }
  }
  
  function serveFile(id, res, download) {
      Model.findById(id).then(file=&gt; {
          var fullPath = Config.uploadDest + "/" + file.path;
          doServeFile(file.filename, fullPath, res, download)
      }).catch(Util.dbErrorHandler);
  }
  router.get("/:id", function (req, res, next) {
      serveFile(req.params.id, res);
  });
  router.get("/download/:id", function (req, res, next) {
      serveFile(req.params.id, res, true);
  });
  </code></pre>
  
  <p>As the codes shown, once I send request <code>/1</code> to the server, it will retrieve the file whose id is <code>1</code> to get the file path, and then use the <code>res.sendFile</code> to serve the file to client.</p>
  
  <p>However when I run the application, I found that the request will hang on too long to have the response. But I can see the logs like this:</p>
  
  <p><code>---try send file:D:/file_upload/1464578330791_user.jpg</code></p>
  
  <p>It seems that the file has been fetched, but the <code>res.sendFile</code> does not complete its job.</p>
  
  <p>Also, when I tried <code>/download/1</code>, the file can be downloaded.</p>
  
  <p>What's going on ?</p>