Log the disconnect diagnostic info that etherpad still sends. Maybe thats usefull
parent
e9a389b0a6
commit
1067d17381
|
@ -31,6 +31,7 @@ var async = require('async');
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var minify = require('./minify');
|
var minify = require('./minify');
|
||||||
|
var formidable = require('formidable');
|
||||||
var exportHandler;
|
var exportHandler;
|
||||||
var importHandler;
|
var importHandler;
|
||||||
var exporthtml;
|
var exporthtml;
|
||||||
|
@ -217,6 +218,17 @@ async.waterfall([
|
||||||
importHandler.doImport(req, res, req.params.pad);
|
importHandler.doImport(req, res, req.params.pad);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//The Etherpad client side sends information about how a disconnect happen
|
||||||
|
//I don't know how to use them, but maybe there usefull, so we should print them out to the log
|
||||||
|
app.post('/ep/pad/connection-diagnostic-info', function(req, res)
|
||||||
|
{
|
||||||
|
new formidable.IncomingForm().parse(req, function(err, fields, files)
|
||||||
|
{
|
||||||
|
console.log(new Date().toUTCString() + ": DIAGNOSTIC-INFO: " + fields.diagnosticInfo);
|
||||||
|
res.end("OK");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
//serve index.html under /
|
//serve index.html under /
|
||||||
app.get('/', function(req, res)
|
app.get('/', function(req, res)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue