Comparing version 0.11.0 to 0.11.1
{ | ||
"name": "bunshine", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"module": "server/server.ts", | ||
@@ -19,3 +19,3 @@ "type": "module", | ||
"@types/ms": "^0.7.34", | ||
"bun-types": "^1.0.21", | ||
"bun-types": "^1.0.22", | ||
"eventsource": "^2.0.2", | ||
@@ -22,0 +22,0 @@ "mitata": "^0.1.6", |
@@ -1,7 +0,7 @@ | ||
<img alt="Bunshine Logo" src="https://github.com/kensnyder/bunshine/raw/main/assets/bunshine-logo.png?v=0.11.0" width="200" height="187" /> | ||
<img alt="Bunshine Logo" src="https://github.com/kensnyder/bunshine/raw/main/assets/bunshine-logo.png?v=0.11.1" width="200" height="187" /> | ||
[](https://npmjs.com/package/bunshine) | ||
[](https://www.npmjs.com/package/bunshine?activeTab=dependencies) | ||
 | ||
[](https://opensource.org/licenses/ISC) | ||
[](https://npmjs.com/package/bunshine) | ||
[](https://www.npmjs.com/package/bunshine?activeTab=dependencies) | ||
 | ||
[](https://opensource.org/licenses/ISC) | ||
@@ -8,0 +8,0 @@ # Bunshine |
@@ -210,4 +210,12 @@ import { BunFile } from 'bun'; | ||
} else { | ||
// Bun will automatically set content-type and length | ||
response = new Response(file, { status: method === 'HEAD' ? 204 : 200 }); | ||
// Bun will automatically set content-type and content-length, | ||
// but delays until the response is actually sent, but middleware might | ||
// want to know the file details ahead of time | ||
response = new Response(file, { | ||
headers: { | ||
'Content-Length': String(file.size), | ||
'Content-Type': file.type || 'application/octet-stream', | ||
}, | ||
status: method === 'HEAD' ? 204 : 200, | ||
}); | ||
} | ||
@@ -214,0 +222,0 @@ if (acceptRanges) { |
Sorry, the diff of this file is not supported yet
203967
3551