flush out HTTP headers for 304 responses

This fixes a regression introduced in b17c29d504513686 because if the
connection is kept alive, the data transfer might stall when not calling
flush.
Merge pull request #228 from avdv/fix-304-pending-flush

flush out HTTP headers for 304 responses