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

Already on GitHub? Sign in to your account

Grammar check. #19

Merged
merged 4 commits into from Jun 28, 2012
View
@@ -1861,7 +1861,7 @@
<p>
What we do here is, we check if a request handler for the given
- pathname exists, and if it does, we simply call the according
+ pathname exists, and if it does, we simply call the corresponding
function. Because we can access our request handler functions
from our object just as we would access an element of an
associative array, we have this nice fluent
@@ -2154,7 +2154,7 @@
What you will notice is this: The /start URL takes 10 seconds
to load, as we would expect. But the /upload URL <em>also</em>
takes 10 seconds to load, although there is no <em>sleep()</em>
- in the according request handler.
+ in the corrsponding request handler.
</p>
<p>
@@ -2551,7 +2551,7 @@
<p>
This will make HTTP requests to <a href="http://localhost:8888/start" rel="nofollow">http://localhost:8888/start</a>
- take at least 10 seconds, but requests to <a href="http://localhost:8888/upload" rel="nofollow">http://localhost:8888/upload</a>
+ take at most 10 seconds, but requests to <a href="http://localhost:8888/upload" rel="nofollow">http://localhost:8888/upload</a>
@manuelkiessling

manuelkiessling Jun 23, 2012

Owner

I'm pretty sure that "at least" makes more sense here, because the request will take the 10 "sleep" seconds and then some, due to the processing overhead that comes with every request (although this is very small, of course).

"At most" sounds like it could sometimes take only 8 seconds, which isn't the case.

@gurjeet

gurjeet Jun 23, 2012

Contributor

I think you are looking at wrong piece of code. I don't see any sleep() calls in /start handler that precedes this statement. The exec("find /") is executed with a timeout of 10000, which means that command can take at most 10 seconds, and no more.

function start(response) {
console.log("Request handler 'start' was called.");

exec("find /",
{ timeout: 10000, maxBuffer: 20000*1024 },
function (error, stdout, stderr) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write(stdout);
response.end();
});
}

@manuelkiessling

manuelkiessling Jun 28, 2012

Owner

Oh, my bad, I'm sorry!

will be answered immediately, even if /start is still
computing.
</p>
@@ -3028,7 +3028,7 @@
</p>
<p>
- In order to make use of Felix' code, the according Node.js
+ In order to make use of Felix' code, the corresponding Node.js
module needs to be installed. Node.js ships with its own
package manager, dubbed <em>NPM</em>. It allows us to install
external Node.js modules in a very convenient fashion. Given a