You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
framework: publicDir gives 404 for a URL with a query string or a percent-encoded file name #769
A file in publicDir is not found when its URL has a query string, or when its name has characters a browser percent-encodes (spaces, non-ASCII).
import{mkdtempSync,writeFileSync}from'fs';import{tmpdir}from'os';import{join}from'path';import{App}from'@deepkit/app';import{FrameworkModule}from'@deepkit/framework';import{HttpKernel,HttpRequest}from'@deepkit/http';constpublicDir=mkdtempSync(join(tmpdir(),'public-'));writeFileSync(join(publicDir,'app.js'),'console.log(1)');writeFileSync(join(publicDir,'price list.txt'),'prices');constapp=newApp({imports: [newFrameworkModule({ publicDir })]});constkernel=app.get(HttpKernel);for(consturlof['/app.js','/app.js?v=123','/price%20list.txt']){constresponse=awaitkernel.request(HttpRequest.GET(url));console.log(url,response.statusCode,response.bodyString);}// /app.js: 200 console.log(1)// /app.js?v=123: actual 404 Not found, should be: 200 console.log(1)// /price%20list.txt: actual 404 Not found, should be: 200 prices
Activity