@tinyhttp/send
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -108,4 +108,5 @@ import { parse, format } from "es-content-type"; | ||
headers["Last-Modified"] = stats.mtime.toUTCString(); | ||
headers["Content-Type"] = contentType(extname(path)); | ||
headers["ETag"] = createETag(stats, encoding); | ||
if (!res.getHeader("Content-Type")) | ||
headers["Content-Type"] = contentType(extname(path)); | ||
let status2 = res.statusCode || 200; | ||
@@ -112,0 +113,0 @@ if (req.headers["range"]) { |
@@ -29,3 +29,3 @@ /// <reference types="node" /> | ||
declare type Req = Pick<I, 'headers'>; | ||
declare type Res = Pick<S, 'setHeader' | 'statusCode' | 'writeHead'> & NodeJS.WritableStream; | ||
declare type Res = Pick<S, 'setHeader' | 'statusCode' | 'writeHead' | 'getHeader'> & NodeJS.WritableStream; | ||
export declare const enableCaching: (res: Res, caching: Caching) => void; | ||
@@ -32,0 +32,0 @@ /** |
{ | ||
"name": "@tinyhttp/send", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "json, send, sendFile, status and sendStatus methods for tinyhttp", |
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
14090
250