-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provisioner small fixes #397
Conversation
constructor( | ||
private expressReq: {body: Body, params: Params, path?: string}, | ||
public readonly expressReq: Request<Params, ResBody, ReqBody, ReqQuery>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing this publicly because I think it's probably going to end up useful eventually.
@@ -1,4 +1,27 @@ | |||
3.2.0 (2021-11-23) | |||
4.0.0 (2022-03-31) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed to forget to push 30f6e3a until after I submitted this PR, which is why the diff looks odd. This is actually on develop
and GitHub is just confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I'm curious about this bit though:
The matrix-host-resolver would die if the well known Content-Type was not application/json. While we could be strict, it appears Synapse is not
Is there a bug for Synapse not behaving nicely here?
I think Synapse is probably doing the correct thing, and in reality well known parsers should try to convert the response into JSON regardless of Content-Type. The problem here is that axios and other HTTP client libraries will not do this unprompted. The spec doesn't mandate a content type, having looked at it. https://spec.matrix.org/v1.2/server-server-api/#resolving-server-names |
I did open an issue on matrix-org/matrix-spec#1025 |
A few things I found annoying when working on the hookshot widget stuff:
addRoute
had only a few supported methods, this has now been increased to all supported methods byRouter
debug
. I'm still 50/50 on that change.application/json
. While we could be strict, it appears Synapse is not and we should attempt to parse strings as JSON.