You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sebez The param should be encoded, that's sure.
I think is is done in api-driver, but it's true it should be done in builder function.
We are gonna correct this
Although, in your use case, you should be using a query string, like /searchConstructeurByText?query=${text}, with text encoded.
I am wondering if the limitations on %2f is only for path part, and not the query string.
In .NET, you can get the result by having a parameter named query, with [FromUri] attribute
We are currently working on adding better solution for query, like giving a queryObj property in fetch options, which is directly building the query string, for either a text or an object, etc.
Current behaviour
Let an autocompletion service that uses a string URL parameter :
If the user uses the
/
character in the input text:zorro/bernardo
=>searchConstructeurByText/zorro/bernardo
searchConstructeurByText/${param1}/${param2}
A solution might be to encode manually the
/
character with%2F
(URL encode for/
).This removes the 404 error but the server might be configured to forbid
%2F
and returns a 400 error.https://stackoverflow.com/questions/4069002/receive-an-http-400-error-if-2f-is-part-of-the-get-url-in-jboss
A rather rude workaround would be to change the service to a POST and not use the URL parameter.
Expected behaviour
focus-core/util/url/builder
should handle seamlessly URL parameter with an/
.Versions
Focus-core: 2.1.1
The text was updated successfully, but these errors were encountered: