Open lguariento opened 3 years ago
After starting the .webapp.py development server and running the validator against it, I noticed that it's actually Loris which returns error 404 instead of the 400 expected by the validator.
As Andrew Hankinson suggested in the IIIF Slack channel, "it probably has to do with the calls to self.raise_404_for_ident
in the Loris resolver, e.g.
and then the fact that the webapp itself sends back a NotFoundResponse
whenever it catches a ResolverException
: https://github.com/loris-imageserver/loris/blob/development/loris/webapp.py#L515-L516. It should probably be changed to return a BadRequestResponse
: https://github.com/loris-imageserver/loris/blob/development/loris/webapp.py#L215-L221".
Hello,
I have Loris running with Apache and
mod_wsgi
. This is my configuration:[edit the configuration is not relevant here. I tested it several times on different machines with different configurations and Loris still outputs 404 instead of 400 for special characters. See additional comments.]
ssl.conf:
From the modules directory, conf.modules.d/10-wsgi.conf:
It all works well except for the server returning 404 instead of 400 for random-generated quality or rotation or size or format when these include characters like ] or ^ or ` or ; or [ etc. See for example here.
This is my image API validator.
What could the reason for that be?