HttpRequestDeinit
Description
Release storage owned by req and zero the struct. Safe to call on a partially-parsed request.
Success
Returns to the caller. *req is zeroed.
Failure
Aborts via LOG_FATAL when req is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Http.c:187:
}
void HttpRequestDeinit(HttpRequest *req) {
if (!req) {
LOG_FATAL("invalid arguments");- In
Beam.c:292:
LOG_INFO("[{}] {} {}", client_addr, method, req.url);
}
HttpRequestDeinit(&req);
StrDeinit(&raw);
}- In
Http.Leak.c:95:
ok = ok && (DebugAllocatorLiveCount(&dbg) > 0);
HttpRequestDeinit(&req);
ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);- In
Http.c:32:
ok = ok && host && ZstrCompare(StrBegin(&host->value), "example.com") == 0;
HttpRequestDeinit(&req);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Http.c:91:
Zstr next = HttpRequestParse(&req, cases[i].raw);
ok = ok && (next != cases[i].raw) && (req.method == cases[i].method);
HttpRequestDeinit(&req);
}- In
Http.c:115:
Zstr next = HttpRequestParse(&req, cases[i]);
ok = ok && (next == cases[i]) && (req.method == HTTP_REQUEST_METHOD_UNKNOWN);
HttpRequestDeinit(&req);
}- In
Http.c:138:
Zstr next = HttpRequestParse(&req, cases[i]);
ok = ok && (next == cases[i]) && (req.method == HTTP_REQUEST_METHOD_UNKNOWN);
HttpRequestDeinit(&req);
}- In
Http.c:170:
bool ok = (next == in);
HttpRequestDeinit(&req);
StrDeinit(&raw);
DefaultAllocatorDeinit(&alloc);- In
Http.c:196:
bool ok = (next != in) && (VecLen(&req.headers) == 100);
HttpRequestDeinit(&req);
StrDeinit(&raw);
DefaultAllocatorDeinit(&alloc);
Last updated on