You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Roland Schaer (JIRA)" <ji...@apache.org> on 2016/08/18 12:44:20 UTC

[jira] [Created] (SLING-5975) POST fails with modern multi-value parameter names containing brackets

Roland Schaer created SLING-5975:
------------------------------------

             Summary: 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)