Move stream assignment; this makes debugging easier.

This commit is contained in:
Jordan Bancino 2023-06-04 18:50:02 +00:00
parent 095e05e927
commit 96a1d3c3c4

View file

@ -46,6 +46,7 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
RouteArgs routeArgs;
requestPath = HttpRequestPath(context);
stream = HttpServerStream(context);
Log(LOG_DEBUG, "%s %s",
HttpRequestMethodToString(HttpRequestMethodGet(context)),
@ -101,7 +102,6 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
Free(contentLen);
stream = HttpServerStream(context);
JsonEncode(response, stream, JSON_DEFAULT);
JsonFree(response);
StreamPrintf(stream, "\n");