Http: multiple response.WriteHeader calls

I want to write a mini framework to learn go. I referenced some code from https://github.com/astaxie/beego