Bug 732078
| Summary: | Consider removing (or basing on mime-type) the "View" functionality for binary files | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Mike Foley <mfoley> | ||||
| Component: | drift | Assignee: | John Sanda <jsanda> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.1 | CC: | jsanda | ||||
| Target Milestone: | --- | Keywords: | FutureFeature, Improvement | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Enhancement | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-02-07 19:28:50 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 707225 | ||||||
| Attachments: |
|
||||||
This is a non-trivial problem. An approach like looking at file extensions is not robust. What if a file does not have an extension. Or how do we handle files with extensions we do not recognize. Adding initial support for determining if a file is a binary type. commit hash: 6abff4105f7a878cb0fb2b8b25a4814c880cc60b The approach take with this commit is simple. DriftManagerBean keeps a set of known binary file extensions (ear, war, zip, etc.) to determine whether or not a file is viewable. Looking at file extensions is easy; however it is not very robust. Files might not have extensions, or the extension could be wrong. Furthermore, there may be extensions of which we are unaware. I think/hope that this commit adequately addresses the issue. If it does not, then I want it to be clear that this could be a much more involved effort. At that point we might look to use something like ModeShape or Apache Tika. marking verified. this is a step forward from original state. will wait to assess if more is needed here as time progresses. changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE |
Created attachment 519080 [details] drift view on binary file Description of problem: Consider removing (or basing on mime-type) the "View" functionality for binary files Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. drift on a binary file 2. view 3. Actual results: see attachment Expected results: Additional info: