[
https://issues.apache.org/jira/browse/NIFI-795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Gilman updated NIFI-795:
-----------------------------
Attachment: 0001-NIFI-795.patch
> Inconsistencies in Rest Api when creating components when clustered
> -------------------------------------------------------------------
>
> Key: NIFI-795
> URL: https://issues.apache.org/jira/browse/NIFI-795
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Matt Gilman
> Assignee: Matt Gilman
> Priority: Minor
> Fix For: 0.3.0
>
> Attachments: 0001-NIFI-795.patch
>
>
> When clustered the Rest Api returns response code 200 when creating new
> components. In standalone mode these same requests return response code 201.
> Both of these requests should be return 201 with the location header set in a
> response header when a new component is created.
> This happens in clustered mode because when the NCM receives the request, it
> converts the POST into a PUT and replicates to the nodes. This happens in
> order to keep the UUID of the new component consistent across the cluster.
> Unfortunately, when these clustering features where introduced the response
> code of a PUT request was never modified to support either 200 or 201.
> Previously, it only supported 200.
> Bottom line, we need to return 201 when it results in the creation of a new
> component and 200 when it's an update to an existing component.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)