Closed Manu1400 closed 6 years ago
I'm open to this, but I don't really have time right now. I wouldn't turn down a pull request, though, assuming it matches everything it needs to.
I probably need more tests on URL parsing, come to think of it....
Actually, looking over the spec, it doesn't appear that going over 100 is invalid. It doesn't make a lot of sense to allow going over 100% for the region request, but it's not actually an invalid request per spec.
In https://github.com/uoregon-libraries/rais-image-server/blob/master/src/iiif/url.go#L28 line, the regex can be more specific, like:
pct:((100|[1-9]?\d(\.\d+)?),){3}(100|[1-9]?\d(\.\d+)?)