Permalink
Browse files

Update some comments.

  • Loading branch information...
1 parent 34d8c95 commit f5f5b26ed03f808520f1f89f451241694ae365d3 @jcvernaleo jcvernaleo committed Aug 1, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 controller.go
View
@@ -185,13 +185,14 @@ func (c *Controller) RenderFile(file *os.File, delivery ContentDisposition) Resu
// RenderBinary is like RenderFile() except that it instead of a file on disk,
// it renders data from memory (which could be a file that has not been written,
// the output from some function, or bytes streamed from somewhere else, as long
-// it implements io.Reader).
+// it implements io.Reader). When called directly on something generated or
+// streamed, modtime should mostly likely be time.Now().
func (c *Controller) RenderBinary(memfile io.Reader, filename string, delivery ContentDisposition, modtime time.Time) Result {
return &BinaryResult{
Reader: memfile,
Name: filename,
Delivery: delivery,
- Length: -1, // http.ServeContent gets the length itself
+ Length: -1, // http.ServeContent gets the length itself unless memfile is a stream.
ModTime: modtime,
}
}

0 comments on commit f5f5b26

Please sign in to comment.