Open
Description
I have an internal server and I am executing a search request, with the following URL
http://localhost:5252/search?collections=sentinel-2-l1c&intersects={%22type%22:%22MultiPolygon%22,%22coordinates%22:[[[[-0.99999991,40.00000005],[8.38190317E-8,40.00000005],[8.38190317E-8,39.00000005],[-0.99999991,39.00000005],[-0.99999991,40.00000005]]]],%22crs%22:{%22type%22:%22name%22,%22properties%22:{%22name%22:%22EPSG:0%22}}}&datetime=2022-08-01T00:00:00Z/2022-08-31T23:59:59.999999999Z
The search returns paginated requests. The "links" field is:
"links": [
{
"rel": "next",
"type": "application/geo+json",
"method": "GET",
"href": "[http://localhost:5252/search?collections=sentinel-2-l1c&intersects={\"type\":\"MultiPolygon\",\"coordinates\":[[[[-0.99999991,40.00000005],[8.38190317E-8,40.00000005],[8.38190317E-8,39.00000005],[-0.99999991,39.00000005],[-0.99999991,40.00000005]]]],\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:0\"}}}&datetime=2022-08-01T00:00:00Z/2022-08-31T23:59:59.999999999Z&token=next:58f1d6c4-8d35-3227-b86a-dcc6a3500e38](http://localhost:5252/search?collections=sentinel-2-l1c&intersects={%22type%22:%22MultiPolygon%22,%22coordinates%22:[[[[-0.99999991,40.00000005],[8.38190317E-8,40.00000005],[8.38190317E-8,39.00000005],[-0.99999991,39.00000005],[-0.99999991,40.00000005]]]],%22crs%22:{%22type%22:%22name%22,%22properties%22:{%22name%22:%22EPSG:0%22}}}&datetime=2022-08-01T00:00:00Z/2022-08-31T23:59:59.999999999Z&token=next:58f1d6c4-8d35-3227-b86a-dcc6a3500e38)"
},
{
"rel": "root",
"type": "application/json",
"href": "http://localhost:5252/"
},
{
"rel": "self",
"type": "application/json",
"href": "http://localhost:5252/search?collections=sentinel-2-l1c&intersects={%22type%22:%22MultiPolygon%22,%22coordinates%22:[[[[-0.99999991,40.00000005],[8.38190317E-8,40.00000005],[8.38190317E-8,39.00000005],[-0.99999991,39.00000005],[-0.99999991,40.00000005]]]],%22crs%22:{%22type%22:%22name%22,%22properties%22:{%22name%22:%22EPSG:0%22}}}&datetime=2022-08-01T00:00:00Z/2022-08-31T23:59:59.999999999Z"
}
]
It can be seen that link "self" escape different characters than link "next" and "previous". In particular, "self" escapes the double quotes.
In addition, characters [ and ] are reserved according to https://developers.google.com/maps/url-encoding?hl=en, and they are not escaped in any case (I have doubts about if characters { and } should be escaped, despite seeming a good idea).
Thanks!