Fix WriteHeader in TestA301ResponseWriter. (#301)

WriteHeader did only set status field for a local copy that was discared
upon return.
This commit is contained in:
Pontus Leitzler
2017-10-08 23:49:13 +02:00
committed by Kamil Kisiel
parent 3f19343c7d
commit bdd5a5a1b0

View File

@@ -1722,15 +1722,15 @@ type TestA301ResponseWriter struct {
status int
}
func (ho TestA301ResponseWriter) Header() http.Header {
func (ho *TestA301ResponseWriter) Header() http.Header {
return http.Header(ho.hh)
}
func (ho TestA301ResponseWriter) Write(b []byte) (int, error) {
func (ho *TestA301ResponseWriter) Write(b []byte) (int, error) {
return 0, nil
}
func (ho TestA301ResponseWriter) WriteHeader(code int) {
func (ho *TestA301ResponseWriter) WriteHeader(code int) {
ho.status = code
}