Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

req.end should be called in any http request #20

Closed
aleafs opened this issue Nov 3, 2013 · 2 comments
Closed

req.end should be called in any http request #20

aleafs opened this issue Nov 3, 2013 · 2 comments

Comments

@aleafs
Copy link
Contributor

aleafs commented Nov 3, 2013

server code:

require('http').createServer(function (req, res) {
  req.on('end', function () {
    res.end('hello world');
  });
}).listen(8124);

client code:

var urllib = require('urllib');

urllib.request('http://localhost:8124/hello', function (err, data, res) {
  console.log(err);
});

Differentce between node v0.8.14 and v0.10.21:

  • v0.8.14, http request ok
  • v0.10.21, RequestTimeoutError
@aleafs
Copy link
Contributor Author

aleafs commented Nov 3, 2013

It is NOT a bug of urllib, but maybe http module in v0.10.21.

$ curl -v "http://localhost:8124/a/b/c"

it will be timeout in v0.10.21, and responses immediately in v0.8.14

@aleafs
Copy link
Contributor Author

aleafs commented Nov 4, 2013

@aleafs aleafs closed this as completed Nov 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant