Skip to content

Commit 0acad8f

Browse files
authored
feat: replace cache-content-type with mime-types directly (#1886)
## Checklist - [x] I have ensured my pull request is not behind the main or master branch of the original repository. - [x] I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first. - [x] I have written a commit message that passes commitlint linting. - [x] I have ensured that my code changes pass linting tests. - [x] I have ensured that my code changes pass unit tests. - [x] I have described my pull request and the reasons for code changes along with context if necessary.
1 parent 2f6e814 commit 0acad8f

File tree

3 files changed

+172
-128
lines changed

3 files changed

+172
-128
lines changed

lib/response.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
* Module dependencies.
55
*/
66

7+
const assert = require('node:assert')
8+
const extname = require('node:path').extname
9+
const util = require('node:util')
10+
711
const contentDisposition = require('content-disposition')
8-
const getType = require('cache-content-type')
912
const onFinish = require('on-finished')
1013
const escape = require('escape-html')
1114
const typeis = require('type-is').is
1215
const statuses = require('statuses')
1316
const destroy = require('destroy')
14-
const assert = require('assert')
15-
const extname = require('path').extname
17+
const encodeUrl = require('encodeurl')
1618
const vary = require('vary')
19+
const getType = require('mime-types').contentType
20+
1721
const isStream = require('./is-stream.js')
1822
const only = require('./only.js')
19-
const util = require('util')
20-
const encodeUrl = require('encodeurl')
2123

2224
/**
2325
* Prototype.

0 commit comments

Comments
 (0)