Open ghost opened 3 years ago
Hi @Mogztter , I would like to help with this issue. we might need most of 'GET' service implementation for all the validations needed (which requires us to construct the diagram), but only not to return it in the response. I checked using JUnit and postman and saw that POST HEAD won't return the content OOB so I think it is ok to use the whole 'GET' service as it is.
Replicate
Perform an HTTP HEAD request as follows:
http HEAD https://kroki.io/graphviz/svg/eNpLyUwvSizIUHBRqOZSUEhU0LVTSLLmqgUAVQQGWQ== --verbose
Expected
Content type set to
image/svg+xml
.Actual
Content type set to
text/plain
.Rationale
HTTP HEAD requests can reduce bandwidth.
Return Values
From the HTTP RFC, it seems 400 or 404 are suitable for bad HEAD requests where an HTTP GET for the same data would fail:
We could also return 204: