[
https://issues.apache.org/jira/browse/NIFI-12762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael W Moser updated NIFI-12762:
-----------------------------------
Description:
ListenHTTP will parse HTTP request headers if the property "HTTP Headers to
receive as Attributes" is set. An HTTP client can sent request headers that
are larger than the default allowed 8192 bytes, and we get the log message
{noformat}
2024-02-08 20:22:16,548 WARN [ListenHTTP (8a290f74-018d-1000-a9d2-c06fdb10e3f3)
Web Server-188] org.eclipse.jetty.http.HttpParser Header is too large
8193>8192{noformat}
and ListenHTTP responds with HTTP ERROR 431 Request Header Fields Too Large
The NiFi UI and REST API sets the max header size to 16384 and it is
configurable in nifi.properties "nifi.web.max.header.size", in the file
FrameworkServerConnectorFactory.java. However, processors should not use
properties in nifi.properties.
We should add a property to ListenHTTP and HandleHttpRequest to allow setting a
max request header size.
was:
ListenHTTP will parse HTTP request headers if the property "HTTP Headers to
receive as Attributes" is set. An HTTP client can sent request headers that
are larger than the default allowed 8192 bytes, and we get the log message
{noformat}
2024-02-08 20:22:16,548 WARN [ListenHTTP (8a290f74-018d-1000-a9d2-c06fdb10e3f3)
Web Server-188] org.eclipse.jetty.http.HttpParser Header is too large
8193>8192{noformat}
and ListenHTTP responds with HTTP ERROR 431 Request Header Fields Too Large
The NiFi UI and REST API sets the max header size to 16384 and it is
configurable in nifi.properties "nifi.web.max.header.size", in the file
FrameworkServerConnectorFactory.java.
We should probably allow ListenHTTP to use the same max header size setting.
Should we also look into this for HandleHttpRequest?
> Add Request Header Maximum Size Property to ListenHTTP and HandleHttpRequest
> ----------------------------------------------------------------------------
>
> Key: NIFI-12762
> URL: https://issues.apache.org/jira/browse/NIFI-12762
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Michael W Moser
> Assignee: Michael W Moser
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: Screenshot from 2024-07-12 19-52-19-1.png
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> ListenHTTP will parse HTTP request headers if the property "HTTP Headers to
> receive as Attributes" is set. An HTTP client can sent request headers that
> are larger than the default allowed 8192 bytes, and we get the log message
> {noformat}
> 2024-02-08 20:22:16,548 WARN [ListenHTTP
> (8a290f74-018d-1000-a9d2-c06fdb10e3f3) Web Server-188]
> org.eclipse.jetty.http.HttpParser Header is too large 8193>8192{noformat}
> and ListenHTTP responds with HTTP ERROR 431 Request Header Fields Too Large
> The NiFi UI and REST API sets the max header size to 16384 and it is
> configurable in nifi.properties "nifi.web.max.header.size", in the file
> FrameworkServerConnectorFactory.java. However, processors should not use
> properties in nifi.properties.
> We should add a property to ListenHTTP and HandleHttpRequest to allow setting
> a max request header size.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)