This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/master by this push:
new f81c810 fix a few typos, HTTP terminology, and mention HTTP status
code 308 (#79)
f81c810 is described below
commit f81c81092af100991a65fe1665754e3e0969ca09
Author: Julian Reschke <[email protected]>
AuthorDate: Tue Feb 1 16:07:51 2022 +0100
fix a few typos, HTTP terminology, and mention HTTP status code 308 (#79)
---
.../the-sling-engine/mappings-for-resource-resolution.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md
b/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md
index 05c7d3e..43a8a40 100644
---
a/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md
+++
b/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md
@@ -22,8 +22,8 @@ The mapping of request URLs to resources is mainly configured
in a configuration
When dealing with the resource resolution we have a number of properties
influencing the process:
* `sling:match` – This property when set on a resource in the `/etc/map`
tree (see below) defines a partial regular expression which is used instead of
the resource's name to match the incoming request. This property is only needed
if the regular expression includes characters which are not valid JCR name
characters. The list of invalid characters for JCR names is: `/, :, [, ], *, ',
", \, |` and any whitespace except blank space. In addition a name without a
name space may not be [...]
-* `sling:redirect` – This property when set on a resource in the
`/etc/map` tree (see below) causes a redirect response to be sent to the
client, which causes the client to send in a new request with the modified
location. The value of this property is applied to the actual request and sent
back as the value of `Location` response header.
-* `sling:status` – This property defines the HTTP status code sent to
the client with the `sling:redirect` response. If this property is not set, it
defaults to 302 (Found). Other status codes supported are 300 (Multiple
Choices), 301 (Moved Permanently), 303 (See Other), and 307 (Temporary
Redirect).
+* `sling:redirect` – This property when set on a resource in the
`/etc/map` tree (see below) causes a redirect response to be sent to the
client, which causes the client to send in a new request with the modified
location. The value of this property is applied to the actual request and sent
back as the value of `Location` response header field.
+* `sling:status` – This property defines the HTTP status code sent to
the client with the `sling:redirect` response. If this property is not set, it
defaults to 302 (Found). Other status codes supported are 300 (Multiple
Choices), 301 (Moved Permanently), 303 (See Other), 307 (Temporary Redirect),
and 308 (Permanent Redirect).
* `sling:internalRedirect` – This property when set on a resource in the
`/etc/map` tree (see below) causes the current path to be modified internally
to continue with resource resolution. This is a multi-value property, i.e.
multiple paths can be given here, which are tried one after another until one
resolved to a resource.
Root Level Mappings apply to the request at large including the scheme, host,
port and uri path. To accomplish this a path is constructed from the request
like this `{scheme}/{host}.{port}/{uri_path}`. This string is then matched
against mapping entries below `/etc/map` which are structured in the content
analogously. The longest matching entry string is used and the replacement,
that is the redirection property, is applied.
@@ -263,8 +263,8 @@ Instead if the `sling:alias` property is set in any
resource under `/content` (e
While an alias can provide a variation for a resource name, a vanity path can
provide an alternative path for a resource. The following properties can be set
on a resource:
* `sling:vanityPath` – This property when set on any resource defines an
alternative path to address the resource.
-* `sling:redirect` – This boolean property when set to `true` on a
resource with a vanity path causes a redirect response to be sent to the
client, which causes the client to send in a new request with the modified
location. The value of the `sling:vanitaPath` property is applied to the actual
request and sent back as the value of the `Location` response header.
-* `sling:redirectStatus` – This property defines the HTTP status code
sent to the client with the `sling:redirect` response. If this property is not
set, it defaults to 302 (Found). Other status codes supported are 300 (Multiple
Choices), 301 (Moved Permanently), 303 (See Other), and 307 (Temporary
Redirect).
+* `sling:redirect` – This boolean property when set to `true` on a
resource with a vanity path causes a redirect response to be sent to the
client, which causes the client to send in a new request with the modified
location. The value of the `sling:vanityPath` property is applied to the actual
request and sent back as the value of the `Location` response header field.
+* `sling:redirectStatus` – This property defines the HTTP status code
sent to the client with the `sling:redirect` response. If this property is not
set, it defaults to 302 (Found). Other status codes supported are 300 (Multiple
Choices), 301 (Moved Permanently), 303 (See Other), 307 (Temporary Redirect),
and 308 (Permanent Redirect).
* `sling:vanityOrder` – It might happen that several resources in the
resource tree specify the same vanity path. In that case the one with the
highest order is used. This property can be used to set such an order.
### Rebuilding The Vanity Bloom Filter
@@ -331,7 +331,7 @@ Use the Apache Felix Web Console Plugin provided at
`/system/console/jcrresolver
To ease with the definition of redirects and aliases when using nodes in a JCR
repository, the following node types are defined:
* `sling:ResourceAlias` – This mixin node type defines the `sling:alias`
property and may be attached to any node, which does not otherwise allow
setting a property named `sling:alias`
-* `sling:MappingSpec` – This mixin node type defines the `sling:match`,
`sling:redirect`, `sling:status`, and `sling:internaleRedirect` properties to
define a matching and redirection inside the `/etc/map` hierarchy.
+* `sling:MappingSpec` – This mixin node type defines the `sling:match`,
`sling:redirect`, `sling:status`, and `sling:internalRedirect` properties to
define a matching and redirection inside the `/etc/map` hierarchy.
* `sling:Mapping` – Primary node type which may be used to easily
construct entries in the `/etc/map` tree. The node type extends the
`sling:MappingSpec` mixin node type to allow setting the required matching and
redirection. In addition the `sling:Resource` mixin node type is extended to
allow setting a resource type and the `nt:hierarchyNode` node type is extended
to allow locating nodes of this node type below `nt:folder` nodes.
Note, that these node types only help setting the properties. The
implementation itself only cares for the properties and their values and not
for any of these node types.