koa 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/response.js +3 -1
  2. package/package.json +1 -1
package/lib/response.js CHANGED
@@ -351,7 +351,9 @@ module.exports = {
351
351
  */
352
352
 
353
353
  attachment (filename, options) {
354
- if (filename) this.type = extname(filename)
354
+ if (filename && !this.has('Content-Type')) {
355
+ this.type = extname(filename)
356
+ }
355
357
  this.set('Content-Disposition', contentDisposition(filename, options))
356
358
  },
357
359
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koa",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Koa web app framework",
5
5
  "main": "lib/application.js",
6
6
  "exports": {