1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Wrap Content-Disposition filename with quotes (#996)

This commit is contained in:
goofle 2017-08-24 20:05:50 +04:30 committed by Vishal Rana
parent 57bf87258f
commit 4df355113b

View File

@ -525,7 +525,7 @@ func (c *context) Inline(file, name string) (err error) {
}
func (c *context) contentDisposition(file, name, dispositionType string) (err error) {
c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf("%s; filename=%s", dispositionType, name))
c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf("%s; filename=%q", dispositionType, name))
c.File(file)
return
}