Handles HEAD requests as if they always were 204. Fixes #13922.