0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

print raw bytes to http response in tests

this has actually always been failing to transform the image, but wasn't
being caught by our tests because we are currently only checking the
response code.
This commit is contained in:
Will Norris 2015-12-14 11:15:03 -08:00
parent 27d53782b4
commit 551fc372a1

View file

@ -225,7 +225,7 @@ func (t testTransport) RoundTrip(req *http.Request) (*http.Response, error) {
img := new(bytes.Buffer)
png.Encode(img, m)
raw = fmt.Sprintf("HTTP/1.1 200 OK\nContent-Length: %d\n\n%v", len(img.Bytes()), img.Bytes())
raw = fmt.Sprintf("HTTP/1.1 200 OK\nContent-Length: %d\n\n%s", len(img.Bytes()), img.Bytes())
default:
raw = "HTTP/1.1 404 Not Found\n\n"
}