support custom reason for status header

Should fix #967. I'm not sure how to write a test for it though.