Skip to content

Commit

Permalink
fix: update deps, rfc5987
Browse files Browse the repository at this point in the history
  • Loading branch information
izatop committed Mar 13, 2024
1 parent 8c13b65 commit c77be63
Show file tree
Hide file tree
Showing 36 changed files with 349 additions and 312 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
324 changes: 162 additions & 162 deletions .yarn/releases/yarn-4.1.0.cjs → .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ supportedArchitectures:
- linux
- win32

yarnPath: .yarn/releases/yarn-4.1.0.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"license": "MIT",
"private": true,
"devDependencies": {
"@commitlint/cli": "^19.0.2",
"@commitlint/config-conventional": "^19.0.0",
"@commitlint/cli": "^19.1.0",
"@commitlint/config-conventional": "^19.1.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.21",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@types/node": "^20.11.26",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -34,7 +34,7 @@
"lerna": "^8.1.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
"typescript": "^5.4.2"
},
"packageManager": "[email protected].0"
"packageManager": "[email protected].1"
}
9 changes: 8 additions & 1 deletion packages/web/src/Transport/Response/DownloadResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ export class DownloadResponse extends ResponseAbstract<Readable> {

function createHeaders(options: DownloadOptions): Record<string, string> {
const size = options.size;
const attributes = [
"attachment",
`filename="${encodeURI(options.filename)}"`,
// Safari https://datatracker.ietf.org/doc/html/rfc5987#section-3.2.2
`filename*=utf-8''${encodeURI(options.filename)}`,
];

const headers: Record<string, string> = {
"Content-Disposition": `attachment; filename="${encodeURI(options.filename)}"`,
"Content-Disposition": attributes.join("; "),
"Content-Length": size.toString(),
"Content-Type": options.mimeType,
};
Expand Down
4 changes: 2 additions & 2 deletions packages/web/test/src/__snapshots__/Main.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`Response Download (auto) 1`] = `
"code": 200,
"cookies": [],
"headers": {
"content-disposition": "attachment; filename="download.txt"",
"content-disposition": "attachment; filename="download.txt"; filename*=utf-8''download.txt",
"content-length": "14",
"content-type": "text/plain",
},
Expand All @@ -18,7 +18,7 @@ exports[`Response Download 1`] = `
"code": 200,
"cookies": [],
"headers": {
"content-disposition": "attachment; filename="download.txt"",
"content-disposition": "attachment; filename="download.txt"; filename*=utf-8''download.txt",
"content-length": "14",
"content-type": "text/plain",
},
Expand Down
Loading

0 comments on commit c77be63

Please sign in to comment.