Browse Source

add some printfs..

v0.7.4-release
Ryan 16 years ago
parent
commit
b518ed9db2
  1. 1
      count-hosts.js
  2. 8
      server.cc

1
count-hosts.js

@ -29,7 +29,6 @@ function Initialize() { }
function Process(request) {
print("hello ");
if (options.verbose) {
log("Processing " + request.host + request.path +
" from " + request.referrer + "@" + request.userAgent);

8
server.cc

@ -6,6 +6,7 @@ extern "C" {
#include "http_request.h"
#include "js_http_request_processor.h"
#include <stdio.h>
#include <assert.h>
#include <string>
#include <map>
@ -38,7 +39,12 @@ void on_headers_complete
{
HttpRequest *request = static_cast<HttpRequest*> (req->data);
processor->Process(request);
bool r = processor->Process(request);
if(r) {
printf("successful request\n");
} else {
printf("unsuccesful request\n");
}
}
void on_request_complete

Loading…
Cancel
Save