[
https://issues.apache.org/jira/browse/STORM-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15006752#comment-15006752
]
ASF GitHub Bot commented on STORM-1204:
---------------------------------------
Github user redsanket commented on a diff in the pull request:
https://github.com/apache/storm/pull/879#discussion_r44933452
--- Diff: storm-core/src/clj/backtype/storm/daemon/logviewer.clj ---
@@ -967,15 +978,30 @@
(ring-response-from-exception ex))))
(GET "/dumps/:topo-id/:host-port/:filename"
[:as {:keys [servlet-request servlet-response log-root]} topo-id
host-port filename &m]
- (let [port (second (split host-port #":"))]
- (-> (resp/response (File. (str log-root
- file-path-separator
- topo-id
- file-path-separator
- port
- file-path-separator
- filename)))
- (resp/content-type "application/octet-stream"))))
+ (let [user (.getUserName http-creds-handler servlet-request)
+ port (second (split host-port #":"))
+ dir (File. (str log-root
+ file-path-separator
+ topo-id
+ file-path-separator
+ port))
+ file (File. (str log-root
+ file-path-separator
+ topo-id
+ file-path-separator
+ port
+ file-path-separator
+ filename))]
--- End diff --
Can we convert this to a utility method, it will be useful
> Logviewer should graceful report page-not-found instead of 500 for bad
> topo-id etc
> ----------------------------------------------------------------------------------
>
> Key: STORM-1204
> URL: https://issues.apache.org/jira/browse/STORM-1204
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core
> Reporter: Kishor Patil
> Assignee: Kishor Patil
>
> Whenever topology-id or filename is wrong or ( in case of secure cluster if
> user is not authorized), the logviewer shows HTTP-500 exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)