title: SendFile issues with respect to control flow in Express Middleware
body: <p>Here is relevant portion of my code, simplified for narrowing the issue:</p>
  
  <pre><code> app.use(middleware1);
   app.use(middleware2);
  
  function middleware1(req,res,next) {
    ...//get extension of request URL
    switch (extension)
    {
      case 'js'  :
      ..
      case 'html': res.sendFile(res.originalUrl,function(err) {});
                   break; //break1
      case 'njm' : break; //break2
      default    : console.log('default');
                   break;
    }
  }
  
  function middleware2(req,res,next) {
     console.log("I am in middleware2");
  }
  </code></pre>
  
  <p>Question is this: In case extension is html, for example, I would not expect middleware2 to be called at all but it does!
  It appears that sendFile initiates the sending of the file and control execution falls thru before the sendFile's callback is called. If I replace break1 by next() or return next() that would be equally flawed - Control will go to next middleware2 before sendFile's callback is executed. How do I stop middleware2 from getting called for the first set of extensions? Also, if extension is 'njm', even without a next(), middleware2 is called. Why?</p>
  
  <p>Please do not suggest using Express static middleware because I have some logic involved in serving different file types which is more complex then the simplified scenario given above.</p>