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

Konrad Windszus commented on SLING-5975:
----------------------------------------

Why do we need to support those "modern parameter names"? Is there any RFC 
about multi-value parameter names ending withj {{[]}}?
I could only find the following reference about GET multi-value parameters 
http://stackoverflow.com/questions/24059773/correct-way-to-pass-multiple-values-for-same-parameter-name-in-get-request
 which is basically saying that there is no standard.

> POST fails with modern multi-value parameter names containing brackets
> ----------------------------------------------------------------------
>
>                 Key: SLING-5975
>                 URL: https://issues.apache.org/jira/browse/SLING-5975
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Post 2.3.12
>            Reporter: Roland Schaer
>
> A POST to update a multi-valued property fails with an error message if 
> modern parameter names with trailing brackets (i.e. {{myparam[]}}) are used.
> {code:title=cURL (resty)}
> POST /content/test -F "test[]=a" -F "test[]=b" -F "test@TypeHint=String[]" -F 
> "test@Delete="
> {code}
> {code:title=error.log}
> 18.08.2016 14:29:04.282 *ERROR* [0:0:0:0:0:0:0:1 [1471523344280] POST 
> /content/test HTTP/1.1] 
> org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception 
> during response processing.
> javax.jcr.RepositoryException: Invalid name or path: test[]
>       at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:359)
>       at 
> org.apache.jackrabbit.oak.jcr.session.ItemImpl.getOakPathOrThrow(ItemImpl.java:323)
>       at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.hasProperty(NodeImpl.java:844)
>       at 
> org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.getType(SlingPropertyValueHandler.java:398)
>       at 
> org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setPropertyAsIs(SlingPropertyValueHandler.java:284)
>       at 
> org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setProperty(SlingPropertyValueHandler.java:158)
>       at 
> org.apache.sling.servlets.post.impl.operations.ModifyOperation.writeContent(ModifyOperation.java:411)
>       at 
> org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:101)
>       at 
> org.apache.sling.servlets.post.AbstractPostOperation.run(AbstractPostOperation.java:92)
>       at 
> org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:202)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to