// so that we can capture the first part of the new protocol
parser.onIncoming(parser.incoming, info.shouldKeepAlive);
}
+
+ return false; // Is response to HEAD request?
};
parser.onBody = function (b, start, len) {
Local<Value> argv[1] = { message_info };
- Local<Value> ret = cb->Call(parser->handle_, 1, argv);
+ Local<Value> head_response = cb->Call(parser->handle_, 1, argv);
- if (ret.IsEmpty()) {
+ if (head_response.IsEmpty()) {
parser->got_exception_ = true;
return -1;
} else {
- return 0;
+ return head_response->IsTrue() ? 1 : 0;
}
}