Set response code before calling finish_request.

This behaviour was changed in commit 37f4ed3.

@lgierth I guess that was not intentional?