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

fix: route Files API by encoded path, url parameter in metadata response is URL encoded #96

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

Maxim-Gadalov
Copy link
Contributor

@Maxim-Gadalov Maxim-Gadalov commented Dec 18, 2023

  1. Core should urldecode path segments, not the full path (as https://github.com/epam/ai-dial-core/blob/development/src/main/java/com/epam/aidial/core/controller/ControllerSelector.java#L47C1-L47C1)
  2. url in the metadata should be correct url. No extra encoding or decoding is required to access it.
  3. name and parentPath in metadata a NOT parts on the url. They should be encoded when building url (as per URL RFC).
  4. Symbol / is reserved as a path segments separator and not allowed in file names and directory names. Requests with / in a file name or directory name will be 400 Bad request. Following requests will end up with 400:
    PUT v1/files/a/b/c%2Fd
    GET v1/files/a/b/c%2Fd
    GET v1/files/metadata/a/b/c%2Fd

@Maxim-Gadalov Maxim-Gadalov changed the title fix: remove URL encoding from url in FileMetadataBase fix: route Files API by encoded path, url parameter in metadata response is URL encoded Dec 19, 2023
@Maxim-Gadalov Maxim-Gadalov merged commit a5d603e into development Dec 19, 2023
5 checks passed
@astsiapanay astsiapanay deleted the fix-file-metadata-url-encoding branch August 9, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants