edsrzf/mongrel2-go — pull request #1 by yep (2012-09-14 14:17:46+00:00)
Title: properly set http response status code.

wroteHeader was always true in WriteHeader(), resulting in all http responses having a status code of 200 (StatusOK).

if you want to return a custom 404 error page with the correct http status code set, you can use:

func testHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
fmt.Fprint(w, "custom 404")
}