node-http-server

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 34  →  ?path2? @ 35
/server.js
@@ -99,10 +99,8 @@
log.log(data.severity, data.message);
})
.on('data', (result) => {
// Set the response status.
response.status = result.status;
// Set the content type and send the data.
response.setHeader('Content-Type', result.type);
response.writeHead(result.status);
result.data
.on('readable', () => result.data.pipe(response))
.on('end', () => response.end());
@@ -137,10 +135,8 @@
log.log(data.severity, data.message);
})
.on('data', (result) => {
// Set the response status.
response.status = result.status;
// Set the content type and send the data.
response.setHeader('Content-Type', result.type);
response.writeHead(result.status);
result.data
.on('readable', () => result.data.pipe(response))
.on('end', () => response.end());