Merge remote-tracking branch 'origin/issues/15'

pull/21/merge
Mat Ryer 2013-06-11 21:23:39 -06:00
commit d2a8d94721
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ func (rw *TestResponseWriter) Header() http.Header {
// Write writes the specified bytes to Output.
func (rw *TestResponseWriter) Write(bytes []byte) (int, error) {
// assume 200 success if no header has been set
if rw.WrittenHeaderInt == 0 {
rw.WriteHeader(200)
}
// add these bytes to the output string
rw.Output = rw.Output + string(bytes)