diff --git a/src/pkg/http/httptest/recorder.go b/src/pkg/http/httptest/recorder.go index 8d70c2834a..0dd19a617c 100644 --- a/src/pkg/http/httptest/recorder.go +++ b/src/pkg/http/httptest/recorder.go @@ -42,6 +42,9 @@ func (rw *ResponseRecorder) Write(buf []byte) (int, os.Error) { if rw.Body != nil { rw.Body.Write(buf) } + if rw.Code == 0 { + rw.Code = http.StatusOK + } return len(buf), nil }