You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/11/02 22:18:02 UTC

[GitHub] [nifi] ottobackwards commented on a change in pull request #5475: NIFI-830 For GET requests, InvokeHTTP should set the filename of the 'Response' FlowFile based on the URL

ottobackwards commented on a change in pull request #5475:
URL: https://github.com/apache/nifi/pull/5475#discussion_r741500536



##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -1269,4 +1291,17 @@ private Charset getCharsetFromMediaType(MediaType contentType) {
     private static File getETagCacheDir() throws IOException {
         return Files.createTempDirectory(InvokeHTTP.class.getSimpleName()).toFile();
     }
+
+    private String getFileNameFromUrl(URL url) {
+        String fileName;
+        String path = StringUtils.removeEnd(url.getPath(), "/");
+

Review comment:
       I think that makes sense, I think a comment, very similar to your reply above in the code will serve future maintainers to understand why it is doing it like it is, and avoid them *just fixing* it  without understanding your concerns




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org