You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2019/07/26 03:19:31 UTC

[GitHub] [storm] Ethanlm commented on a change in pull request #3091: STORM-3472: Add tests missing for STORM-3411, make the download file name generat…

Ethanlm commented on a change in pull request #3091: STORM-3472: Add tests missing for STORM-3411, make the download file name generat…
URL: https://github.com/apache/storm/pull/3091#discussion_r307574795
 
 

 ##########
 File path: storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/utils/LogviewerResponseBuilder.java
 ##########
 @@ -76,24 +76,18 @@ public static Response buildSuccessJsonResponse(Object entity, String callback,
      * Build a Response object representing download a file.
      *
      * @param host host address
+     * @param contentDispositionName The name to set in the Content-Disposition header
      * @param file file to download
      */
-    public static Response buildDownloadFile(String host, File file, Meter numFileDownloadExceptions) throws IOException {
-        String fname;
-        try {
-            String topoInfo = file.getParentFile().getParentFile().getName();
-            String port = file.getParentFile().getName();
-            fname = String.format("%s-%s-%s-%s", host, port, topoInfo, file.getName());
-        } catch (NullPointerException e) {
-            fname = file.getName();
-        }
+    public static Response buildDownloadFile(String host, String contentDispositionName,
 
 Review comment:
   The `String host` parameter can be removed. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services