08-27-周三_17-09-29

This commit is contained in:
2025-08-27 17:10:05 +08:00
commit 86df397d8f
12735 changed files with 1145479 additions and 0 deletions

73
node_modules/sockjs/lib/chunking-test.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
(function() {
var utils;
utils = require('./utils');
exports.app = {
chunking_test: function(req, res, _, next_filter) {
var write,
_this = this;
res.setHeader('Content-Type', 'application/javascript; charset=UTF-8');
res.writeHead(200);
write = function(payload) {
try {
return res.write(payload + '\n');
} catch (x) {
}
};
utils.timeout_chain([
[
0, function() {
return write('h');
}
], [
1, function() {
return write(Array(2049).join(' ') + 'h');
}
], [
5, function() {
return write('h');
}
], [
25, function() {
return write('h');
}
], [
125, function() {
return write('h');
}
], [
625, function() {
return write('h');
}
], [
3125, function() {
write('h');
return res.end();
}
]
]);
return true;
},
info: function(req, res, _) {
var info;
info = {
websocket: this.options.websocket,
origins: ['*:*'],
cookie_needed: !!this.options.jsessionid,
entropy: utils.random32()
};
res.setHeader('Content-Type', 'application/json; charset=UTF-8');
res.writeHead(200);
return res.end(JSON.stringify(info));
},
info_options: function(req, res) {
res.statusCode = 204;
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET');
res.setHeader('Access-Control-Max-Age', res.cache_for);
return '';
}
};
}).call(this);