spring-framework / org.springframework.web.util / DefaultUriTemplateHandler / setStrictEncoding

setStrictEncoding

open fun setStrictEncoding(strictEncoding: Boolean): Unit

Whether to encode characters outside the unreserved set as defined in RFC 3986 Section 2. This ensures a URI variable value will not contain any characters with a reserved purpose.

By default this is set to false in which case only characters illegal for the given URI component are encoded. For example when expanding a URI variable into a path segment the "/" character is illegal and encoded. The ";" character however is legal and not encoded even though it has a reserved purpose.

Note: this property supersedes the need to also set the parsePath property.

Parameters

strictEncoding - whether to perform strict encoding

Since
4.3