Skip to content

Commit 4df3551

Browse files
a-pavvishr
authored andcommitted
Wrap Content-Disposition filename with quotes (#996)
1 parent 57bf872 commit 4df3551

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ func (c *context) Inline(file, name string) (err error) {
525525
}
526526

527527
func (c *context) contentDisposition(file, name, dispositionType string) (err error) {
528-
c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf("%s; filename=%s", dispositionType, name))
528+
c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf("%s; filename=%q", dispositionType, name))
529529
c.File(file)
530530
return
531531
}

0 commit comments

Comments
 (0)