mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions
This commit is contained in:
parent
299544f9c5
commit
cdfb8e7afa
4 changed files with 67 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue