-
Notifications
You must be signed in to change notification settings - Fork 51
Simple HTTP proxying fails #92
Copy link
Copy link
Closed
Milestone
Description
The script below requires express.js and request.js simply installed using npm. When running it on node.js and browsing to http://localhost:8090/request you'll get the landing page of google, as expected. However, when running in Trireme, the response data is truncated half-way of data. Trouble is, the reading side of the client socket is closed although not all data was read...
var request = require('request');
var express = require('express');
var app = express();
app.get('/request', function(req, res) {
request('http://www.google.de', function(error, response, body) {
if(error) {
console.log(error);
res.send(response.statusCode, error);
throw error;
}
console.log(body);
res.send(response.statusCode, body);
});
});
app.listen(8090);
console.log(process.versions);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels