Skip to content

Commit

Permalink
Fix WriteHeader in TestA301ResponseWriter. (#301)
Browse files Browse the repository at this point in the history
WriteHeader did only set status field for a local copy that was discared
upon return.
  • Loading branch information
leitzler authored and kisielk committed Oct 8, 2017
1 parent 3f19343 commit bdd5a5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit bdd5a5a

Please sign in to comment.