feature(package) win32 v6.0.0

This commit is contained in:
coderaiser 2021-02-27 20:52:32 +02:00
parent fec91e7093
commit 89af33fb9d
4 changed files with 18 additions and 1 deletions

View file

@ -135,7 +135,7 @@
"try-catch": "^3.0.0", "try-catch": "^3.0.0",
"try-to-catch": "^3.0.0", "try-to-catch": "^3.0.0",
"tryrequire": "^3.0.0", "tryrequire": "^3.0.0",
"win32": "^5.1.11", "win32": "^6.0.0",
"wraptile": "^3.0.0", "wraptile": "^3.0.0",
"writejson": "^3.0.0", "writejson": "^3.0.0",
"yargs-parser": "^20.2.5" "yargs-parser": "^20.2.5"

1
server/fixture/route.js Normal file
View file

@ -0,0 +1 @@
hello

View file

@ -95,6 +95,7 @@ async function route({config, options, request, response}) {
} }
response.setHeader('Content-Type', contentType(extname(fullPath))); response.setHeader('Content-Type', contentType(extname(fullPath)));
//response.setHeader('Content-Length', contentLength);
await pipe([ await pipe([
stream, stream,

View file

@ -411,3 +411,18 @@ test('cloudcmd: route: dropbox', async (t) => {
t.end(); t.end();
}); });
test('cloudcmd: route: content type', async (t) => {
const options = {
root: fixtureDir,
};
const {headers} = await request.get('/route.js', {
options,
});
const result = headers.get('content-length');
t.equal(result, '78');
t.end();
});