Function
fileWebResponse
(file, status, statusText, headers, _options)
Source from the content-addressed store, hash-verified
| 24 | }) |
| 25 | }, |
| 26 | fileWebResponse(file, status, statusText, headers, _options) { |
| 27 | return ServerResponse.raw(Readable.fromWeb(file.stream() as any), { |
| 28 | headers: Headers.merge( |
| 29 | headers, |
| 30 | Headers.unsafeFromRecord({ |
| 31 | "content-type": headers["content-type"] ?? Mime.getType(file.name) ?? "application/octet-stream", |
| 32 | "content-length": file.size.toString() |
| 33 | }) |
| 34 | ), |
| 35 | status, |
| 36 | statusText |
| 37 | }) |
| 38 | } |
| 39 | }) |
| 40 | |
| 41 | /** @internal */ |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…