Using get-header in not-modified and content-type middleware

Based on code from Herwig Hochleitner.