bugfix: we might send the response header twice when an error happens. this issue is exposed by nginx 1.5.4. thanks Markus Linnala for the report in #21.