Commit 34cd13e
authored
response: clarify Content-Disposition, close file in Stream example (#351)
It wasn't clear to me what were the differences between `Context#File`,
`Context#Attachment` and `Context#Inline` - reading the source made it
clearer: the former 2 are referring to sending `Content-Disposition`
with `attachment` and `inline`, which makes sense.
Adding missing `defer f.Close()` in the `Context#Stream` example. I also
checked, it takes an `io.Reader` not an `io.ReadCloser` so it couldn't
delegate the close to `Context#Stream`.1 parent a2569cd commit 34cd13e
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
0 commit comments