Skip to content

Commit c4d312d

Browse files
committed
Updated Content-Disposition header by adding UTF-8 support.
1 parent 968d67d commit c4d312d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

changes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- added: `String.arg(obj)` for a simple templating `Hello {variable}!`
44

55
- updated: RESTBuilder default headers are lower-case
6+
- updated: `content-disposition` header by adding `utf-8` according to [RFC 5987](https://tools.ietf.org/html/rfc5987#section-3.2.2)
67

78
- fixed: a missing property `controller.params` in WebSocket controller
89
- fixed: `$ASYNC()` execution in some cases

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14937,7 +14937,7 @@ function extend_response(PROTO) {
1493714937
headers = U.extend_headers(headers, res.options.headers);
1493814938

1493914939
if (res.options.download)
14940-
headers['Content-Disposition'] = 'attachment; filename="' + encodeURIComponent(res.options.download) + '"';
14940+
headers['Content-Disposition'] = 'attachment; filename*=utf-8\'\'' + encodeURIComponent(res.options.download);
1494114941
else if (headers['Content-Disposition'])
1494214942
delete headers['Content-Disposition'];
1494314943

0 commit comments

Comments
 (0)