Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slashes in the id are not escaped when requesting a thread #260

Open
flokle opened this issue Dec 26, 2024 · 2 comments
Open

Slashes in the id are not escaped when requesting a thread #260

flokle opened this issue Dec 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@flokle
Copy link

flokle commented Dec 26, 2024

Describe the bug
If a thread id contains a “/”, it is not escaped when querying a single thread and a "Unrecognized request URL" error is returned.

To Reproduce
Query a single thread via the SDK where the id contains a “/”

Expected behavior
The id is fully escaped on request, the thread data is returned

SDK Version:
2.5.0

@flokle flokle added the bug Something isn't working label Dec 26, 2024
@alanschnegg
Copy link

If i can add something else, the same problem occur when trying to fetch for a folder with id containing "/", seems like the the ids are simply encoded but the "/" are not replaced by most basics encoding function, they need to be replace manually
account.getId().replaceAll("/", "%2F") worked for me as a temporally solution but could be a really good add to the sdk

@flokle
Copy link
Author

flokle commented Dec 31, 2024

I‘ve also tried to replace the slashes before, but the ‚%‘ is replaced by the escaping mechanism of the sdk afterwards. Which leads to ‚%252F‘.

A workaround for me was to wrap these ids by some strings like ‚blabla(ID)blabla and add an Interceptor to the underlying okhttp requester. This interceptor unwraps the id, adjusts the HttpUrl accordingly - and replaces the slashes within the id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants