{"action":"closed","issue":{"url":"https://api.github.com/repos/astaxie/beego/issues/1387","labels_url":"https://api.github.com/repos/astaxie/beego/issues/1387/labels{/name}","comments_url":"https://api.github.com/repos/astaxie/beego/issues/1387/comments","events_url":"https://api.github.com/repos/astaxie/beego/issues/1387/events","html_url":"https://github.com/astaxie/beego/issues/1387","id":109617269,"number":1387,"title":"executeError方法中，是否应该取消WriteHeader？","user":{"login":"tudyzhb","id":3745427,"avatar_url":"https://avatars.githubusercontent.com/u/3745427?v=3","gravatar_id":"","url":"https://api.github.com/users/tudyzhb","html_url":"https://github.com/tudyzhb","followers_url":"https://api.github.com/users/tudyzhb/followers","following_url":"https://api.github.com/users/tudyzhb/following{/other_user}","gists_url":"https://api.github.com/users/tudyzhb/gists{/gist_id}","starred_url":"https://api.github.com/users/tudyzhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tudyzhb/subscriptions","organizations_url":"https://api.github.com/users/tudyzhb/orgs","repos_url":"https://api.github.com/users/tudyzhb/repos","events_url":"https://api.github.com/users/tudyzhb/events{/privacy}","received_events_url":"https://api.github.com/users/tudyzhb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-03T11:00:14Z","updated_at":"2015-10-12T12:56:28Z","closed_at":"2015-10-12T12:56:28Z","body":"https://github.com/astaxie/beego/blob/master/error.go#L456\r\n后面的err.handler可能是用户自定义的，而WriteHeader只能运行一次，这直接导致了用户的errHandler无法改写header status code。建议将error.go#L456的WriteHeader移入默认的404,401,403,500 and 503.处理中。\r\n\r\n从开发者角度来说，既然我主动注册了Errorhandler，WriteHeader那点操作还是知道的。"}}