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 10, 2024
1 parent 923cd77 commit 8b1a757
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 8b1a757

Please sign in to comment.