Revert "Decode path for createElementInDirectoryPath endpoint" #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #156: the issue arises because the path is encoded twice when the request is built in case-import-server (gridsuite/case-import-server#15), not because it's not decoded in directory-server.
This double encoding seems to be repeated in other places in our codebase when building a URI.
The pattern is the following where a first encoding is done in:
And a second one when using
restTemplate.exchange()
There are other places in our code where we decode while we should probably just not encode twice:
https://github.com/gridsuite/loadflow-server/blob/32904c78c88b4fcee92108581acfbab1b9a2d24a/src/main/java/org/gridsuite/loadflow/server/LoadFlowController.java#L85