mirror of https://github.com/lukechilds/node.git
Ryan
16 years ago
3 changed files with 26 additions and 13 deletions
@ -1,12 +1,12 @@ |
|||||
function Process(request) { |
function Process(request) { |
||||
log("Processing " + request.path + ". method: " + request.method); |
log("Processing " + request.path + ". method: " + request.method); |
||||
|
|
||||
|
// sends null on the last chunk.
|
||||
request.onBody = function (chunk) { |
request.onBody = function (chunk) { |
||||
log("body chunk: " + chunk); |
log("body chunk: '" + chunk + "'"); |
||||
} |
} |
||||
|
|
||||
request.respond("HTTP/1.0 200 OK\r\n") |
request.respond("HTTP/1.0 200 OK\r\n") |
||||
request.respond("Content-Type: text-plain\r\nContent-Length: 6\r\n\r\nhello\n"); |
request.respond("Content-Type: text-plain\r\nContent-Length: 6\r\n\r\nhello\n"); |
||||
/* |
request.respond(null); // eof
|
||||
request.response_complete(); |
|
||||
*/ |
|
||||
} |
} |
||||
|
Loading…
Reference in new issue