Local tile streaming HTTP 206 route handler (src/app/tiles/[file]/route.ts) #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Refactor
src/app/tiles/[file]/route.tsinto a robust local HTTP 206 Partial Content streaming endpoint supporting HEAD requests, sanitization of requested byte bounds, and strict file security boundaries against directory traversal.Technical specifications
src/app/tiles/[file]/route.ts: Streaming route handler.HEADrequests withAccept-Ranges: bytesandContent-Length.bytes=start-end) against actual file size on disk.../or encoded equivalents).416 Range Not Satisfiablefor invalid ranges.Acceptance criteria
curl -I -H "Range: bytes=0-512" http://localhost:3000/tiles/peat_soil.pmtilesreturns206 Partial Content.Content-Lengthwithout loading the entire archive into memory.Authoritative Specifications & Reference Documentation
docs/ARCHITECTURE.mdIssue 26: [Backend] Local tile streaming HTTP 206 route handler (to [Backend] Local tile streaming HTTP 206 route handler (src/app/tiles/[file]/route.ts)src/app/tiles/[file]/route.ts)[Backend] Local tile streaming HTTP 206 route handler (to Local tile streaming HTTP 206 route handler (src/app/tiles/[file]/route.ts)src/app/tiles/[file]/route.ts)Closed as completed in main (src/app/tiles/[file]/route.ts supports RFC 7233 HTTP 206 Partial Content byte ranges).