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

ZSS Unix contents API untagged file GET behavior unexpected #475

Open
1000TurquoisePogs opened this issue May 20, 2022 · 0 comments
Open
Labels
enhancement New feature or request zss

Comments

@1000TurquoisePogs
Copy link
Member

1000TurquoisePogs commented May 20, 2022

When a file is untagged, most programs in USS assume the contents are 1047.
However, some files can be binary instead.
So, there's fairly common behavior of what files are readable and are not in an editor when untagged.

But not in the Zowe Desktop editor. It does something more interesting, but unexpected
When untagged, it reads through a list of extensions to determine if the file should be treated as 1047 or binary.

https://github.com/zowe/zowe-common-c/blob/ed8ae5f9794179da06102c13970081d308e09543/c/httpserver.c#L3856-L3897

That mime list has multiple uses, beyond just the unix contents api. But we're using it for that at least, and maybe we shouldn't?
There are two issues with it currently

  1. there is no .txt, .java, .ts extensions listed... we need to target more common cases at least
  2. when a file has no extension, it is assumed binary, which is opinionated

For the unix api, it seems like there should be an option to turn the extension-behavior on/off, or to provide a custom list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request zss
Projects
Status: Backlog
Development

No branches or pull requests

1 participant