Skip to content

Commit

Permalink
fix: blanks in dav Content-Disposition header
Browse files Browse the repository at this point in the history
Fixes the encoding of blanks in the dav `Content-Disposition` header.

This is a regression caused by cs3org#4748.
  • Loading branch information
JammingBen committed Jul 12, 2024
1 parent 633973b commit b6e7cc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Blanks in dav Content-Disposition header

We've fixed the encoding of blanks in the dav `Content-Disposition` header.

https://github.com/cs3org/reva/pull/4762
https://github.com/owncloud/web/issues/11169
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/net/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

// ContentDispositionAttachment builds a ContentDisposition Attachment header with various filename encodings
func ContentDispositionAttachment(filename string) string {
return "attachment; filename*=UTF-8''" + url.QueryEscape(filename) + "; filename=\"" + filename + "\""
return "attachment; filename*=UTF-8''" + url.PathEscape(filename) + "; filename=\"" + filename + "\""
}

// RFC1123Z formats a CS3 Timestamp to be used in HTTP headers like Last-Modified
Expand Down

0 comments on commit b6e7cc5

Please sign in to comment.