nasa / cmr-stac

Other
43 stars 21 forks source link

"next" links use URL escaping that the server doesn't understand #205

Open Kodiologist opened 2 years ago

Kodiologist commented 2 years ago

Consider for example https://cmr.earthdata.nasa.gov/stac/LPDAAC_ECS/search?bbox=-76,42,-75,43&collections=MOD21A1D.v061&limit=1 . The "next" link here is https://cmr.earthdata.nasa.gov/stac/LPDAAC_ECS/search?bbox=-76%2C42%2C-75%2C43&collections=MOD21A1D.v061&limit=1&page=2 , which returns HTTP 400. If you unescape the commas, yielding https://cmr.earthdata.nasa.gov/stac/LPDAAC_ECS/search?bbox=-76,42,-75,43&collections=MOD21A1D.v061&limit=1&page=2 , it works.

demiurg commented 1 year ago

https://www.rfc-editor.org/rfc/rfc3986#section-2.2

Commas seem to be in a set of characters that should be percent encoded in GET values. So, the GET values should be percent decoded before interpreted further.