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 path = require('path');
|
||||
var minify = require('./minify');
|
||||
var formidable = require('formidable');
|
||||
var exportHandler;
|
||||
var importHandler;
|
||||
var exporthtml;
|
||||
|
@ -217,6 +218,17 @@ async.waterfall([
|
|||
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 /
|
||||
app.get('/', function(req, res)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue