Conversation
Initial usable version
Add Dockerfile
reyoung
left a comment
There was a problem hiding this comment.
Looks good to me, but need some other to review further.
|
|
||
| png, e := ioutil.ReadFile(pngFile) | ||
| candy.Must(e) | ||
| _, e = w.Write(png) |
There was a problem hiding this comment.
Should we change HTTP response header for PNG file?
- Content-Type to image/png
- Content-Length to image byte size.
Is them important for golang? will them be set automatically?
There was a problem hiding this comment.
Good point, Content-Type http package will not know, so programmer have to set if she wishes.
Content-Length I think will be automatically set by http package.
Anyway, I think most of the browsers are able to detect Content-Type if it's not set. For png file there will be a png signature at the beginning of the png binary.
|
|
||
| png, e := ioutil.ReadFile(pngFile) | ||
| candy.Must(e) | ||
| _, e = w.Write(png) |
There was a problem hiding this comment.
Good point, Content-Type http package will not know, so programmer have to set if she wishes.
Content-Length I think will be automatically set by http package.
Anyway, I think most of the browsers are able to detect Content-Type if it's not set. For png file there will be a png signature at the beginning of the png binary.
No description provided.