Skip to content

Commit

Permalink
Return 204 for some missing files in tiles/sparse204. This way we can…
Browse files Browse the repository at this point in the history
… use st passthrough to generate 204 results. (#5269)
  • Loading branch information
xabbu42 authored Dec 27, 2024
1 parent bbb4815 commit 9c0ac3e
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions test/integration/assets/tiles/sparse204
Binary file removed test/integration/assets/tiles/sparse204/0-0-0.mvt
Binary file not shown.
Binary file removed test/integration/assets/tiles/sparse204/0-0-0.png
Binary file not shown.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
22 changes: 16 additions & 6 deletions test/integration/render/run_render_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,12 +990,22 @@ async function executeRenderTests() {
'--disable-web-security'
]});

const server = http.createServer(
st({
path: 'test/integration/assets',
cors: true,
})
);
const mount = st({
path: 'test/integration/assets',
cors: true,
passthrough: true,
});
const server = http.createServer((req, res) => {
mount(req, res, () => {
if (req.url.includes('/sparse204/1-')) {
res.writeHead(204);
res.end('');
} else {
res.writeHead(404);
res.end('');
}
});
});

const mvtServer = http.createServer(
st({
Expand Down

0 comments on commit 9c0ac3e

Please sign in to comment.