Skip to content

Commit 841507d

Browse files
committed
no message
1 parent 26ef36d commit 841507d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

dist/http/cwmp/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ response = function(res) {
9191
'SOAPServer': 'ACSServer'
9292
};
9393
code = 404;
94+
data = null;
9495
if (res.name && (methods[res.name] != null)) {
9596
if (res.id == null) {
9697
res.id = '1690d26c77f0000';
@@ -103,14 +104,13 @@ response = function(res) {
103104
}
104105
} else if (finished) {
105106
code = 204;
106-
data = null;
107107
headers['Connection'] = "close";
108108
headers['Content-Length'] = 0;
109109
console.log('<<< EMPTY RESPONSE');
110-
console.dir([headers, data]);
111110
}
111+
console.dir([code, headers, data]);
112112
res.writeHead(code, headers);
113-
return res.end(data);
113+
res.end(data);
114114
};
115115

116116
module.exports = function(url) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tch-exploit",
3-
"version": "2.0.0-rc2",
3+
"version": "2.0.0-rc3",
44
"main": "dist/index.js",
55
"bin": "dist/index.js",
66
"scripts": {

src/http/cwmp/index.coffee

+5-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ response = (res) ->
8484
'SOAPServer' : 'ACSServer'
8585

8686
code = 404
87+
data = null
8788

8889
if res.name and methods[res.name]?
8990
res.id ?= '1690d26c77f0000'
@@ -98,17 +99,19 @@ response = (res) ->
9899

99100
else if finished
100101
code = 204
101-
data = null
102102

103103
headers['Connection'] = "close"
104104
headers['Content-Length'] = 0
105105

106106
console.log '<<< EMPTY RESPONSE'
107-
console.dir [ headers, data ]
107+
108+
console.dir [ code, headers, data ]
108109

109110
res.writeHead code, headers
110111
res.end data
111112

113+
return
114+
112115
module.exports = (url) ->
113116
(req, res) ->
114117
COOKIE_REGEX = /\s*([a-zA-Z0-9\-_]+?)\s*=\s*"?([a-zA-Z0-9\-_]*?)"?\s*(,|;|$)/g

0 commit comments

Comments
 (0)