@tinyhttp/send
Advanced tools
Comparing version 1.0.7 to 1.0.8
# @tinyhttp/send | ||
## 1.0.8 | ||
### Patch Changes | ||
- Fix minor sendFile and download bugs | ||
## 1.0.7 | ||
### Patch Changes | ||
@@ -5,0 +12,0 @@ |
@@ -132,6 +132,5 @@ import { format, parse } from 'es-content-type'; | ||
throw new TypeError('path must be a string to res.sendFile'); | ||
if (headers) { | ||
if (headers) | ||
for (const [k, v] of Object.entries(headers)) | ||
res.setHeader(k, v); | ||
} | ||
if (!isAbsolute(path)) | ||
@@ -141,3 +140,3 @@ throw new TypeError('path must be absolute'); | ||
if (cb) | ||
stream.on('error', (err) => void cb(err)).on('end', () => void cb()); | ||
stream.on('error', (err) => cb(err)).on('end', () => cb()); | ||
res.setHeader('Content-Type', contentType(extname(path))); | ||
@@ -144,0 +143,0 @@ stream.pipe(res); |
{ | ||
"name": "@tinyhttp/send", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "json, send, sendFile, status and sendStatus methods for tinyhttp", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18985
361