[ 
https://issues.apache.org/jira/browse/NIFI-7822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17199038#comment-17199038
 ] 

Otto Fowler commented on NIFI-7822:
-----------------------------------

I would think that we may want to consider having a query attribute strategy, 
were you could say RAW or Attributes or something maybe.  I wouldn't think we 
would want to have multiple copies of that.

As for the parameters, they are a map, so they must have unique names.  If you 
have something that has duplicated parameters, there is no way around this, 
unless the parameter names are made unique before putting in attributes, so if 
the processor says
" if we already have an attribute with this name, from this query, append a 
number to the name" or something.


> Set raw query string attribute in HandleHttpRequest processor
> -------------------------------------------------------------
>
>                 Key: NIFI-7822
>                 URL: https://issues.apache.org/jira/browse/NIFI-7822
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 1.11.4
>            Reporter: Yuriy Flyud
>            Priority: Major
>
> HandleHttpRequest parses a query string and writes output to the following 
> attributes:
>  * http.query.string
>  * http.query.param.XXX
> The problem is that neither of these two options works as expected if I want 
> to use query parameters later in my flow.
> First option holds a DECODED query string, so if we are using some characters 
> like & or = in query parameter names or values - there is no way to resolve 
> this. E.g. query string 'text=abc%26notAProp%3D25' will be decoded to 
> 'text=abc&notAProp=25' which is a completely different query string with 
> additional parameter.
> Second option does not handle duplicating query parameters. So query like 
> 'name=John&name=Colin' will be resolved to a single attribute 'name', with 
> value 'Colin'.
>  
> A simple improvement would be to add an 'http.query.raw.string' at least to 
> give a possibility to parse this query string manually where needed.
> '



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to