mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(rest) put response: no gzip, content, content-type: plain text
This commit is contained in:
parent
82c3601cb1
commit
1965e31b11
1 changed files with 10 additions and 4 deletions
|
|
@ -130,15 +130,21 @@
|
|||
|
||||
function onFS(params, callback) {
|
||||
var path,
|
||||
p = params,
|
||||
query = ponse.getQuery(p.request);
|
||||
p = params,
|
||||
query = ponse.getQuery(p.request),
|
||||
optionsDefauls = {
|
||||
gzip: false,
|
||||
name:'.txt'
|
||||
};
|
||||
|
||||
p.name = Util.rmStrOnce(p.name, CloudFunc.FS) || '/';
|
||||
path = mellow.convertPath(p.name);
|
||||
|
||||
switch (p.request.method) {
|
||||
case 'PUT':
|
||||
onFSPut(query, path, p.request, callback);
|
||||
onFSPut(query, path, p.request, function(error, data) {
|
||||
callback(error, optionsDefauls, data);
|
||||
});
|
||||
break;
|
||||
|
||||
case 'GET':
|
||||
|
|
@ -199,7 +205,7 @@
|
|||
msg = formatMsg('delete', names);
|
||||
}
|
||||
|
||||
callback(error, {gzip: false, name: '.txt'}, msg);
|
||||
callback(error, optionsDefauls, msg);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue