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

Cluster should handle replicating DELETE request with non-zero content length header

    XMLWordPrintableJSON

    Details

      Description

      When sending a DELETE request to a node in the cluster, the cluster coordinator attempts to replicate the request to all nodes in the cluster before committing it (two phase commit). According to RFC 7231, a DELETE request may have a body, but the body has no defined purpose:

      A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request.

      The cluster request replication does not expect a request body when a DELETE request is received, so when it replicates the request to other nodes, it does not include the body, if present. However, the Content-Length header is forwarded in tact, and if this header contains a non-zero length, the other nodes will wait to receive the expected body. This can cause request time outs.

      The solution is to intercept DELETE requests with a non-zero Content-Length header and overwrite that value to 0.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alopresto Andy LoPresto
                Reporter:
                alopresto Andy LoPresto
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: