+doc #20521 Enrich docs and tests regarding empty strings used in matchers (#20719)

This commit is contained in:
Robert Budźko 2016-06-08 15:20:21 +02:00 committed by Konrad Malawski
parent 3c2e31ea41
commit e40a2b21c4
5 changed files with 42 additions and 0 deletions

View file

@ -24,6 +24,10 @@ a ``path`` directive will always be empty).
Depending on the type of its ``PathMatcher`` argument the ``path`` directive extracts zero or more values from the URI.
If the match fails the request is rejected with an :ref:`empty rejection set <empty rejections>`.
.. note:: The empty string (also called empty word or identity) is a **neutral element** of string concatenation operation,
so it will match everything, but remember that ``path`` requires whole remaining path being matched, so (``/``) will succeed
and (``/whatever``) will fail. The :ref:`-pathPrefix-java-` provides more liberal behaviour.
Example
-------

View file

@ -18,6 +18,9 @@ As opposed to its :ref:`-rawPathPrefix-java-` counterpart ``pathPrefix`` automat
Depending on the type of its ``PathMatcher`` argument the ``pathPrefix`` directive extracts zero or more values from
the URI. If the match fails the request is rejected with an :ref:`empty rejection set <empty rejections>`.
.. note:: The empty string (also called empty word or identity) is a **neutral element** of string concatenation operation,
so it will match everything and consume nothing. The :ref:`-path-java-` provides more strict behaviour.
Example
-------

View file

@ -31,6 +31,10 @@ a ``path`` directive will always be empty).
Depending on the type of its ``PathMatcher`` argument the ``path`` directive extracts zero or more values from the URI.
If the match fails the request is rejected with an :ref:`empty rejection set <empty rejections>`.
.. note:: The empty string (also called empty word or identity) is a **neutral element** of string concatenation operation,
so it will match everything, but remember that ``path`` requires whole remaining path being matched, so (``/``) will succeed
and (``/whatever``) will fail. The :ref:`-pathPrefix-` provides more liberal behaviour.
Example
-------

View file

@ -25,6 +25,9 @@ As opposed to its :ref:`-rawPathPrefix-` counterpart ``pathPrefix`` automaticall
Depending on the type of its ``PathMatcher`` argument the ``pathPrefix`` directive extracts zero or more values from
the URI. If the match fails the request is rejected with an :ref:`empty rejection set <empty rejections>`.
.. note:: The empty string (also called empty word or identity) is a **neutral element** of string concatenation operation,
so it will match everything and consume nothing. The :ref:`-path-` provides more strict behaviour.
Example
-------