mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(package) win32 v6.0.0
This commit is contained in:
parent
fec91e7093
commit
89af33fb9d
4 changed files with 18 additions and 1 deletions
|
|
@ -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
1
server/fixture/route.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
hello
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue