senchalabs/connect — pull request #590 by timkuijsten (2012-06-09 17:40:16+00:00)
Title: don't send 304 on responses that would otherwise not have a 2xx or 304 s...

according to the RFC no 304 should be sent when the response without the conditional request headers should have resulted in another status code than 2xx or 304 (or even <> 200 in case of only a If-Modified-Since header).

I encountered this problem while sending a 403 on pages where the user needs to be logged in and serving a static login.html file (so the static file is only served if the user is not logged in).