[
https://issues.apache.org/jira/browse/SLING-5975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15426481#comment-15426481
]
ASF GitHub Bot commented on SLING-5975:
---------------------------------------
GitHub user roele opened a pull request:
https://github.com/apache/sling/pull/162
SLING-5975 - POST fails with modern multi-value parameter names containing
brackets
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/roele/sling SLING-5975
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/162.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #162
----
commit 363fd50b6a40e0e1b8de03b4770bfcbb724ec48b
Author: Roland Schaer <[email protected]>
Date: 2016-08-18T13:42:41Z
SLING-5975 - POST fails with modern multi-value parameter names containing
brackets
----
> 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)