[ 
https://issues.apache.org/jira/browse/NIFI-10397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann resolved NIFI-10397.
-------------------------------------
      Assignee: David Handermann
    Resolution: Won't Fix

Unfortunately this behavior appears to be the best option available based on 
the usage of OkHttp.

The OkHttp library requires sending something for the {{User-Agent}} header. 
When building a request, if InvokeHTTP did not set a {{{}User-Agent{}}}, the 
library defaults to sending the library name and version number. OkHttp does 
not support setting {{null}} for the {{User-Agent}} header, so sending an empty 
string is the best option for those who want to avoid sending something. Other 
HTTP client libraries might support different behavior, but changing libraries 
for InvokeHTTP would require a substantial rewrite of the Processor.

> InvokeHTTP is sending empty User-Agent header
> ---------------------------------------------
>
>                 Key: NIFI-10397
>                 URL: https://issues.apache.org/jira/browse/NIFI-10397
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Josh Highley
>            Assignee: David Handermann
>            Priority: Minor
>
> Issue introduced by this change:  [https://github.com/apache/nifi/pull/4428]
> When the InvokeHTTP processor configuration has no value for UserAgent, 
> InvokeHTTP is still sending a User-Agent header but with no header value.  
> (User-Agent: \r\n)
> If the configuration has no value, then no User-Agent header should be sent.
> An empty value for User-Agent header will trigger some request scanners 
> attempting to block robots.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to