Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-1913

HandleHttpRequest doesn't correctly handle failures to register requests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0, 0.7.0, 1.0.0-Beta
    • None
    • None

    Description

      While looking at this[1] stack overflow question I came across the fact that HandleHttpRequest doesn't properly handle the flowfiles when there is a failure to register[2]. The created FlowFile should be removed just like it is done here[3]. This lack of removal causes a FlowFileHandlingException to occur when the context map fails to register the flowfile.

      The fix is simply adding "session.remove(flowFile);" to the "if (!registered)" block.

      [1] http://stackoverflow.com/questions/37394219/nifi-transfer-relationship-not-specified
      [2] https://github.com/apache/nifi/blob/9064b976317e316f42ac279dd026105b54a17ddb/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java#L601-L601
      [3] https://github.com/apache/nifi/blob/9064b976317e316f42ac279dd026105b54a17ddb/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java#L489-L489

      Attachments

        Issue Links

          Activity

            People

              jpercivall Joe Percivall
              jpercivall Joe Percivall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: