I figured out that giving a parameter ":operation" with any invalid value 
should do the job 
(https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#slingpostservlet-operations).
 That will lead to a 500 status no modification in the repo.
The error message is not very verbose though, but good enough for my purpose.
Alternatively one can use "nop" as value for ":operation" together with 
parameter ":nopstatus" set to 500.

> On 18. Jun 2020, at 15:27, Bertrand Delacretaz <[email protected]> wrote:
> 
> On Thu, Jun 18, 2020 at 2:46 PM Konrad Windszus
> <[email protected]> wrote:
>> ...Is there a simple way (like a certain parameter or request path format) 
>> which prevents the
>> Sling POST servlet from responding?...
> 
> Not that I know, but my memory is bad for such things.
> 
>> If not, do you think that this would be a useful addition?
> 
> I think so - maybe something like the PathBasedAcceptor [1] created
> for SLING-8110 could help set stricter requirements for that default
> servlet to execute.
> 
> -Bertrand
> 
> [1] 
> https://github.com/apache/sling-org-apache-sling-servlets-resolver/blob/master/src/main/java/org/apache/sling/servlets/resolver/internal/PathBasedServletAcceptor.java

Reply via email to