uoregon-libraries / rais-image-server

RAIS: A IIIF-compliant, 100% open source image server for blazing-fast deep zooming
Creative Commons Zero v1.0 Universal
78 stars 6 forks source link

Use a regex more specific for 'pct:' #8

Closed Manu1400 closed 6 years ago

Manu1400 commented 6 years ago

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+)?)

jechols commented 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....

jechols commented 6 years ago

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.