aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-04-09 02:43:20 +0800
committerMarcoFalke <[email protected]>2020-04-09 02:45:37 +0800
commit661bd5dea3d080cd79f15c7703fc6ab577a1aa0c (patch)
tree78425abd58bccce0f21288edd2228f6cfbbebdb9 /src/httpserver.cpp
parentMerge #18521: fuzz: Add process_messages harness (diff)
parenttests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related fun... (diff)
downloaddiscoin-661bd5dea3d080cd79f15c7703fc6ab577a1aa0c.tar.xz
discoin-661bd5dea3d080cd79f15c7703fc6ab577a1aa0c.zip
Merge #18363: tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions
cdfb8e7afa7648405dd6b957f47b1c7ab566a076 tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions (practicalswift) Pull request description: Add fuzzing harness for `HTTPRequest`, `libevent`'s `evhttp` and related functions. ACKs for top commit: laanwj: ACK cdfb8e7afa7648405dd6b957f47b1c7ab566a076 Tree-SHA512: da481afed5eb3232d3f3d0583094e56050e6234223dfcb356d8567fe0616336eb1b78c5e6821325fc9767e385e5dfaf3c96f0d35ffdb67f18d74f9a9a9464e24
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp6
1 files changed, 3 insertions, 3 deletions
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) {