Send M_UNKNOWN on all requests for now.

This commit is contained in:
Jordan Bancino 2022-09-16 11:49:21 -04:00
parent d0fb926f2a
commit d7a1f7411d

View file

@ -41,11 +41,12 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
char *key;
char *val;
HashMap *response;
Log(lc, LOG_MESSAGE, "%s %s",
HttpRequestMethodToString(HttpRequestMethodGet(context)),
HttpRequestPath(context));
LogConfigIndent(lc);
Log(lc, LOG_DEBUG, "Request headers:");
@ -78,9 +79,16 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
goto finish;
}
/* TODO: Route requests here */
HttpSendHeaders(context);
stream = HttpStream(context);
fprintf(stream, "{}\n");
response = MatrixErrorCreate(M_UNKNOWN);
JsonEncode(response, stream);
fprintf(stream, "\n");
JsonFree(response);
finish:
stream = HttpStream(context);
@ -90,7 +98,7 @@ finish:
}
HashMap *
MatrixCreateError(MatrixError errorArg)
MatrixErrorCreate(MatrixError errorArg)
{
HashMap *errorObj;
char *errcode;