mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
refactor(main) isGzip: pReq -> req
This commit is contained in:
parent
19183b3506
commit
3921cc0137
1 changed files with 8 additions and 7 deletions
|
|
@ -384,7 +384,7 @@
|
|||
p.status = FILE_NOT_FOUND;
|
||||
|
||||
if (!p.data && error)
|
||||
p.data = error.toString();
|
||||
p.data = error.message;
|
||||
|
||||
sendResponse(p);
|
||||
}
|
||||
|
|
@ -427,14 +427,15 @@
|
|||
return pathname;
|
||||
}
|
||||
|
||||
function isGZIP(pReq) {
|
||||
var lEnc, lGZIP;
|
||||
if (pReq) {
|
||||
lEnc = pReq.headers['accept-encoding'] || '';
|
||||
lGZIP = lEnc.match(/\bgzip\b/);
|
||||
function isGZIP(req) {
|
||||
var enc, is;
|
||||
|
||||
if (req) {
|
||||
enc = req.headers['accept-encoding'] || '';
|
||||
is = enc.match(/\bgzip\b/);
|
||||
}
|
||||
|
||||
return lGZIP;
|
||||
return is;
|
||||
}
|
||||
|
||||
function setHeader(header, response) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue