bug-clinic
bug-clinic copied to clipboard
Running scan/node-debug step freezes on windows
trafficstars
Console output:
bug-clinic run scan.js
TAP version 13
listening
HTTP: SERVER new http connection
HTTP: outgoing message end.
HTTP: server socket close
# (anonymous)
ok 1 exited without errors
ok 2 got expected response from server
*[this is where it gets stuck]*
scan.js:
var request = require("http").request;
var contentType = "text/html";
var body = "<html>" +
"<head><title>hi</title></head>" +
"<body><p>yo</p></body>" +
"</html>";
var headers = {
host : "localhost",
port : 9876,
method : "GET",
headers : {
"content-type" : contentType,
//"content-length" : body.length,
"requested-by" : "Request"
}
};
var yolo = request(headers, function (res) {
res.setEncoding("utf8");
res.on("data", function (data) {
console.log("BODY: " + data);
});
res.on("end", function () {
console.error("done!");
});
});
yolo.end();
Thanks! Once I get back to a machine with Windows on it I'll fix this.