marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
2.99k stars 790 forks source link

Ch. 20, File Server - Output stream clarification #560

Closed alexpi closed 2 years ago

alexpi commented 2 years ago

On explaining the PUT method, the text says: "The output stream to the request may also fail, for example if the network goes down". The request is a readable stream. What is the output stream to the request?

Below, we have: "When pipe is done, it will close the output stream, which causes it to fire a "finish" event''. From this sentence I infer that the output stream is the object created with createWriteStream(path), but this doesn't seem to match the first sentence.

marijnh commented 2 years ago

Yeah, that is confused nonsense. I've fixed it to just say "stream from the request" instead in attached patch.