diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-03-17 02:03:16 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-04-06 13:58:51 +0000 |
commit | cdfb8e7afa7648405dd6b957f47b1c7ab566a076 (patch) | |
tree | 037b12555949782db2977d8626ff4c5bf7b9c363 /src/httpserver.cpp | |
parent | 299544f9c5375810f3b4f70e68d2340fe689108a (diff) |
tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r-- | src/httpserver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 11d73b7c9a..7282b517f4 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) { |