[
https://issues.apache.org/jira/browse/NIFI-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15108638#comment-15108638
]
ASF GitHub Bot commented on NIFI-1393:
--------------------------------------
Github user mcgilman commented on a diff in the pull request:
https://github.com/apache/nifi/pull/175#discussion_r50262265
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
---
@@ -534,12 +536,7 @@ public void process(final HttpResponse response, final
HttpContext httpContext)
destinationAccepts = config.getDestinationAccepts();
if (destinationAccepts == null) {
try {
- if (sendAsFlowFile) {
- destinationAccepts =
getDestinationAcceptance(client, url, getLogger(), transactionId);
- } else {
- destinationAccepts = new
DestinationAccepts(false, false, false, false, null);
--- End diff --
In the previous version of PostHTTP, the acceptsFlowFileV[1,2,3] are false
and the protocol is null when sendAsFlowFIle is set to false. In the current
version, the values will be based on the response from the HEAD request.
1) If that response happens to return NOT_ALLOWED, it is assumed to be V1.
I don't think this assumption is valid anymore.
2) If that response happens to return OK, the values will be based on the
response. However, it looks like there are assumptions which could set the
FlowFile version and protocol incorrectly.
I followed these paths through and I don't think there are any issues as
the Processor only considers these fields when sendAsFlowFile is true. However,
having the fields set incorrectly could be potentially error prone in the
future as the assumptions stated are no longer true.
I think to address this we simply need to consider sendAsFlowFile when
deciding the value of acceptsFlowFileV[1,2,3] and protocol. These fields should
only be set/initialized when sendAsFlowFile is true.
> PostHTTP does not apply compression level unless configured to send FlowFIles
> -----------------------------------------------------------------------------
>
> Key: NIFI-1393
> URL: https://issues.apache.org/jira/browse/NIFI-1393
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: 0.4.1
> Reporter: Aldrin Piri
> Assignee: Aldrin Piri
> Priority: Minor
> Fix For: 0.5.0
>
>
> PostHTTP only provides transfer compression (Content-Encoding: gzip) when
> additionally configured to send data as FlowFIles. We should provide
> detection of support by the receiving server and make this possible for
> generic payloads as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)