Skip to content
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

Returns a 405 instead of a 404 on GET /{diagramType} and GET /{diagramName}/{outputFormat} #1621

Closed
ggrossetie opened this issue Aug 20, 2023 · 0 comments · Fixed by #1644
Closed
Labels
👶 good first issue Good for newcomers 💡 proposal 🍩 enhancement New feature or request ☕ java Related to Java code

Comments

@ggrossetie
Copy link
Member

New users are sometimes confused with the 404 status code. For instance, GET /mermaid and GET /mermaid/svg currently returns a 404 because the method GET is not supported (i.e., it expects a POST request with an application/json or text/plain payload).

The server must generate an Allow header field in a 405 status code response. The field must contain a list of methods that the target resource currently supports.

In this case, the Allow header should be:

Allow: POST

Similarly, we should make sure that we return a 415 Unsupported Media Type if the user tries to send a request with an unsupported format (such as application/xml).
But we can address this concern in an other issue/pull request.

@ggrossetie ggrossetie added 🍩 enhancement New feature or request 👶 good first issue Good for newcomers ☕ java Related to Java code 💡 proposal labels Aug 20, 2023
ggrossetie added a commit to ggrossetie/kroki that referenced this issue Aug 28, 2023
ggrossetie added a commit to ggrossetie/kroki that referenced this issue Sep 23, 2023
ggrossetie added a commit to ggrossetie/kroki that referenced this issue Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👶 good first issue Good for newcomers 💡 proposal 🍩 enhancement New feature or request ☕ java Related to Java code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant