Gábor Gyimesi created MINIFICPP-1787:
----------------------------------------

             Summary: Handle invalid attributes in HTTP headers in InvokeHTTP
                 Key: MINIFICPP-1787
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1787
             Project: Apache NiFi MiNiFi C++
          Issue Type: New Feature
            Reporter: Gábor Gyimesi


InvokeHTTP adds all attributes of the incoming flow file to the HTTP headers of 
the message being sent. It is possible that these incoming attributes do not 
comply with the HTTP protocol, for example having spaces in the attribute 
names. In this case the HTTP message will be invalid. We should:
 # Check what other invalid characters could occur (if any) besides spaces in 
attributes
 # Add a new property to InvokeHTTP to decide what to do in case we encounter 
such invalid attributes

We also have multiple options how this new property could behave:
 # A simple flag that indicates to transform the invalid attributes 
automatically if it is turned on, otherwise throw an error if an invalid 
attribute is found
 # An enum with multiple options for what should happen if an invalid attribute 
is found: throw an error, transform the invalid attributes, drop the invalid 
attributes
 # For option 2 a 4th enum could be added as a regex (defined in a separate 
property) to indicate what the transformation should do

The automatic transformation could work simply by replacing the spaces with 
dots or dashes or could comply with the standard HTTP header guidelines using 
"X-" prefixes and dashes between capitalized words (The downside of the latter 
that it may be less predictable on the receiving side when looking for a 
specific attribute).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to