forked from Telodendria/Telodendria
Send M_UNKNOWN on all requests for now.
This commit is contained in:
parent
d0fb926f2a
commit
d7a1f7411d
1 changed files with 11 additions and 3 deletions
14
src/Matrix.c
14
src/Matrix.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue