Change HttpResponse creation method.

This commit is contained in:
XMRig 2019-03-29 12:56:34 +07:00
parent 01ad6bf2d9
commit 9daa5874f5
9 changed files with 55 additions and 18 deletions

View file

@ -97,11 +97,9 @@ void xmrig::HttpServer::onConnection(uv_stream_t *stream, uint16_t)
int xmrig::HttpServer::onComplete(http_parser *parser)
{
HttpContext *context = reinterpret_cast<HttpContext*>(parser->data);
HttpResponse res(context->id());
HttpResponse res;
res.parser = parser;
context->listener->onHttp(*context, res);
context->listener->onHttpRequest(*context);
return 0;
}