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

Felix Meschberger commented on SLING-588:
-----------------------------------------

> Dealing with POST requests ignores extensions and selectors completely (I 
> cannot have a POST.html.esp, for instance)

Partly wrong: Sling _always_ deals with selectors and extension. Point is that 
selectors and extensions are only considered for HEAD/GET requests and 
otherwise ignored.

> Sling is trying to be smarter than the user here by expecting that no 
> reasonable person could ever want to create a node with a dot in its name.

Yes and no. Depends on how you look at it. Actually, we assume in the 
SlingPostServlet that you want to create content without a dot. This is what we 
most of the times in a CMS or such.

Now, of course YMMV and you might want to create content with a dot, this is ok 
and perfectly valid in some cases.

The problem is of course the term "some cases": If there would be no means to 
inform Sling of whether to use the "some cases" case or the general case, Sling 
could just assume something, which may be wrong in "some cases". Hence the 
SlingPostServlet has support for supplying the real name or a name hint.

Lars, you would use this mechanism to supply the actual name to use. This is 
intended and correct. The problem is, that an NPE is thrown in case you like to 
create such a node below the root node.

So, finally, I suggest to rather fix the NPE and keep the rest as it is 
(backwards compatibility comes as another argument, btw).

> Sling ignores specified node path when creating content
> -------------------------------------------------------
>
>                 Key: SLING-588
>                 URL: https://issues.apache.org/jira/browse/SLING-588
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Lars Trieloff
>         Attachments: SLING-588.patch
>
>
> As described here: http://markmail.org/message/u3be3mpaal4efngj Sling will 
> ignore the node path specified in the HTTP request when creating contents 
> which makes it impossible to create nodes with a dot in the node name from a 
> form post.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to