forked from Telodendria/Telodendria
Fix an instance of setting response headers after they were sent.
This commit is contained in:
parent
708a840ec0
commit
e7e25cade5
1 changed files with 3 additions and 3 deletions
|
@ -125,15 +125,15 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
|
|||
|
||||
Free(pathPart);
|
||||
|
||||
HttpSendHeaders(context);
|
||||
|
||||
if (!response)
|
||||
{
|
||||
Log(lc, LOG_WARNING, "A route handler returned NULL.");
|
||||
Log(lc, LOG_ERR, "A route handler returned NULL.");
|
||||
HttpResponseStatus(context, HTTP_INTERNAL_SERVER_ERROR);
|
||||
response = MatrixErrorCreate(M_UNKNOWN);
|
||||
}
|
||||
|
||||
HttpSendHeaders(context);
|
||||
|
||||
stream = HttpStream(context);
|
||||
JsonEncode(response, stream);
|
||||
fprintf(stream, "\n");
|
||||
|
|
Loading…
Reference in a new issue