-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
Related to this PR: #2355
In iojs 3.2.0 the following code works, in iojs 3.3.0 and node 4 the following code throws an error.
var Http = require('http');
var Url = require('url');
var server = Http.createServer(function (req, res) {
res.writeHead(200);
res.end();
});
server.listen(8080);
var uri = Url.parse('http://localhost:8080/');
uri.method = 'post';
var req = Http.request(uri);
var payload = new Array(1640).join('0123456789');
req.write(payload);
req.end();
Error:
_http_server.js:515
this._handle.readStart();
^
TypeError: Cannot read property 'readStart' of null
at Socket.onSocketResume (_http_server.js:515:15)
at emitNone (events.js:67:13)
at Socket.emit (events.js:166:7)
at resume_ (_stream_readable.js:712:10)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
If you change the payload size to just under 16kb it works:
var Http = require('http');
var Url = require('url');
var server = Http.createServer(function (req, res) {
res.writeHead(200);
res.end();
});
server.listen(8080);
var uri = Url.parse('http://localhost:8080/');
uri.method = 'post';
var req = Http.request(uri);
var payload = new Array(1639).join('0123456789');
req.write(payload);
req.end();
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.