From cdfb8e7afa7648405dd6b957f47b1c7ab566a076 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 17 Mar 2020 02:03:16 +0000 Subject: tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions --- src/httpserver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/httpserver.cpp') diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 11d73b7c9..7282b517f 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -189,7 +189,7 @@ static bool InitHTTPAllowList() } /** HTTP request method as string - use for logging only */ -static std::string RequestMethodString(HTTPRequest::RequestMethod m) +std::string RequestMethodString(HTTPRequest::RequestMethod m) { switch (m) { case HTTPRequest::GET: @@ -510,10 +510,10 @@ void HTTPEvent::trigger(struct timeval* tv) else evtimer_add(ev, tv); // trigger after timeval passed } -HTTPRequest::HTTPRequest(struct evhttp_request* _req) : req(_req), - replySent(false) +HTTPRequest::HTTPRequest(struct evhttp_request* _req, bool _replySent) : req(_req), replySent(_replySent) { } + HTTPRequest::~HTTPRequest() { if (!replySent) { -- cgit v1.2.3