Skip to content

Commit 9d635cd

Browse files
committed
no message
1 parent 2e15952 commit 9d635cd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

dist/http/cwmp/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ set = function(obj, key, value) {
2828
};
2929

3030
request = function(ip, req, res) {
31-
var body, cwmp, cwmpVersion, element, header, idElement, input, k, key, params, ref1, ref2, ref3, ref4, ref5, str, v, value, xml;
31+
var body, cwmp, cwmpVersion, element, f, header, idElement, input, k, key, params, ref1, ref2, ref3, ref4, ref5, str, v, value, xml;
3232
if (req.body.length > 0) {
3333
console.log('>>> REQUEST');
3434
console.dir([req.headers, req.body]);
@@ -74,10 +74,10 @@ request = function(ip, req, res) {
7474
} else if (stage === 'cwmp:Inform') {
7575
console.log('>>> EMPTY REQUEST');
7676
console.dir([req.headers, req.body]);
77-
file = file.custom || file.sts;
77+
f = file.custom || file.sts;
7878
res.name = 'cwmp:Download';
7979
res.fileType = '3 Vendor Configuration File';
80-
res.fileSize = file.length;
80+
res.fileSize = f.length;
8181
res.url = "http://" + ip + "/file.sts";
8282
}
8383
res.env = env.join(' ');

dist/http/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ module.exports = function(ip, port) {
2727
}
2828
}
2929
route.get('/file.sts', function(req, res) {
30-
var headers, stream;
30+
var f, headers, stream;
3131
console.log('>>> STS REQUEST');
32-
file = file.custom || file.sts;
32+
f = file.custom || file.sts;
3333
headers = {
3434
'Content-Type': 'text/plain',
35-
'Content-Length': file.length
35+
'Content-Length': f.length
3636
};
3737
console.log('>>> STS RESPONSE');
38-
console.dir([headers, file.toString('utf8')]);
38+
console.dir([headers, f.toString('utf8')]);
3939
res.writeHead(200, headers);
4040
stream = new Duplex();
41-
stream.push(file);
41+
stream.push(f);
4242
stream.push(null);
4343
return stream.pipe(res);
4444
}).get('/done', function(req, res) {

0 commit comments

Comments
 (0)