Skip to content

Invalid http response with slow network #1976

Open
@lauriro

Description

@lauriro

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  -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions