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

Invalid http response with slow network #1976

Open
lauriro opened this issue Aug 13, 2021 · 0 comments
Open

Invalid http response with slow network #1976

lauriro opened this issue Aug 13, 2021 · 0 comments

Comments

@lauriro
Copy link
Contributor

lauriro commented Aug 13, 2021

server.js

var fs = require("fs")
require("http").createServer(function(request, response) {
        fs.createReadStream("10mb.file").pipe(response)
})
.listen(8080)
# reading file fast results correct hash
$ curl -s http://localhost:8000/ | sha1sum
39c380826c78c5631ad3a922b22e1363596e5dd7  -
$ cat 10mb.file | pv -L 2m | sha1sum
39c380826c78c5631ad3a922b22e1363596e5dd7  -
# reading file slow results different hash each time
$ curl -s http://localhost:8000/ | pv -L 1m | sha1sum
a1c72482a927f1c2e45f674496873608b1bf571f  -
$ curl -s http://localhost:8000/ | pv -L 1m | sha1sum
30137c13f61dcb3766ae1b8e1a90d22f6887924e  -
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