-
2.7.1 (??-??-2026)
-
Bugs fixed
- A request whose preconditions fail (
If-Match,If-None-Match...) with a method that the resource does not support is now answered 405 (Method Not Allowed) with theAllowheader, instead of 412 (Precondition Failed) or of the status of a custom precondition such as 428, as RFC 9110 section 13.2.1 requires. The supported methods are the ones declared byServerResource.updateAllowedMethods(), the annotated methods by default; a resource that declares nothing is not changed. Issue #1752. - A conditional write (
If-Match,If-None-Match...) to a resource that supports the method but cannot be read (for example an annotated@Putwithout GET) was answered 405 (Method Not Allowed) by the missing GET, used to retrieve the validators, although the method is supported. The preconditions are now evaluated as for a resource with no known representation:If-Matchfails with 412,If-None-Matchpasses. The resource can overridegetInfo()to provide its validators. Only a resource that declares its methods (ServerResource.updateAllowedMethods(), the annotated methods by default) is concerned. Issue #1753. - An
If-Rangeheader carrying a date is now honoured only if that date is a strong validator, as RFC 9110 section 13.1.5 requires: aLast-Modifiedless than one second older than the response is weak, so the range is ignored and the whole entity is sent instead of a partial content. Issue #1742. DefaultSslContextFactorynow uses the JVM default algorithms for the trust manager (TrustManagerFactory.getDefaultAlgorithm(),PKIX) and the key manager (KeyManagerFactory.getDefaultAlgorithm()) instead of the obsoleteSunX509, unless thessl.TrustManagerFactory.algorithmorssl.KeyManagerFactory.algorithmsystem property, thetrustManagerAlgorithmorkeyManagerAlgorithmparameter, or the setters say otherwise. A valid certificate chain that is not in order is no longer rejected with a "Certificate chaining error". ThePKIXvalidation is the standard one, and stricter thanSunX509on unusual chains: set the trust manager algorithm toSunX509to get the previous behavior. Issue #1397.Redirector.getTargetRef()now removes the dot segments (.and..) of the target URI (RFC 3986, section 5.2.4), so theLocationheader of a client redirection and the URI of a server redirection are normalized. Relative-path targets such as../xare left untouched, as they need their base reference. A reverse proxy built onhttp://backend/root/{rr}now resolves a..found in the remaining part itself, which it did not before the request reached the backend. Issue #238.- The Jackson, Gson and JSON (org.json) converters now handle the
application/*+jsonmedia types, such asapplication/vnd.example+json. They were ignored, so an incoming+jsonentity was not converted, and a+jsonresponse was left to another converter (such as JAXB) when it scored higher than the 0.5 given by Jackson. A custom converter that won for these media types may now lose to the JSON converters. Issue #1185. - A HEAD request answered 304 (Not Modified) now carries the same headers as the GET request: the validators and caching headers only, not the other entity headers such as
Content-TypeandLast-Modified(RFC 9110, section 15.4.5). Issue #1738. - The
Rangeheader is now applied to GET requests only, as RFC 9110 section 14.2 requires: a HEAD request with a range was answered "206 Partial Content" (and so was OPTIONS), it is now answered as without the range. Issue #1734. - A
CacheDirectivecreated by a factory, such asCacheDirective.maxAge(60), now equals the same directive read from a header:equalsandhashCodeuse the name and the value only, no longer thedigitattribute, which has no effect on the written header.isDigit(),setDigit(boolean)and the constructorCacheDirective(String, String, boolean)are deprecated and will be removed in Restlet 3.0. Issue #1730. - A 304 (Not Modified) response now carries the
Expiresheader of the entity, as RFC 9110 section 15.4.5 requires, so that a revalidating cache refreshes it. Issue #1712. - Slf4j bridge reports wrong line number and caller class in log4j. Issue #233.
- When GET is an allowed method of a server resource, HEAD is now also listed (e.g. in the Allow header of a 405 response). Issue #266.
- The Max-Age and Path attributes of a version 1 cookie are no longer quoted in the Set-Cookie header, as browsers ignore them otherwise. Issue #1334.
- CookieAuthenticator no longer lets the next restlet overwrite the redirection sent after a login. Issue #554.
- CorsService and CorsFilter now add
Vary: Originto every response when the CORS answer depends on the request origin (origin allow-list or credentials allowed), including requests without anOriginheader, so shared caches no longer serve the response of one origin to another. A static*without credentials still sends noVary, as recommended by the Fetch standard. Issue #1611. - Fixed the parsing of a
WWW-Authenticatechallenge made of a token68 ending with=(such as aNegotiatetoken): the whole header was dropped. Issue #191. - The
realmandcharsetparameters of an HTTP Basic challenge are now recognized whatever their case (Realm=,Charset=), as required by RFC 9110. Issue #1455. ChallengeScheme.valueOf()returnedHTTP_OAUTHfor the names of the Bearer and MAC schemes (HTTP_Bearer,HTTP_MAC) instead ofHTTP_OAUTH_BEARERandHTTP_OAUTH_MAC. Issue #1618.- The description of
Status.CLIENT_ERROR_TOO_MANY_REQUESTS(429) contained backslashes before the quotes of "rate limiting". CacheDirective.noCache(String),noCache(List),privateInfo(String)andprivateInfo(List)produced a doubly quoted value (no-cache="\"Set-Cookie\""), and a list was written as one quoted name per element. The directive value now holds the raw field names (Set-Cookie, orSet-Cookie, Authorizationfor a list, no quotes), andCacheDirectiveWriterwrites them as a single quoted-string (no-cache="Set-Cookie, Authorization"), as required by RFC 9111 section 5.2.2.4. Code readinggetValue()of these directives no longer sees the quotes. Issue #745.- The
Rangerequest header is now handled as RFC 9110 section 14 requires. A header with a range unit other thanbytes, or an invalid one (bytes=a-b,bytes=5-3,bytes=, a number too large for along), is ignored and the whole entity is returned, instead of a 500 error (NumberFormatException), a 501 or a meaningless 206:RangeReader.readreturns an empty list and never throws. Thebytesunit is matched ignoring case. A range selecting nothing of the entity (first position at or after its end, orbytes=-0) is answered with a 416 (Range Not Satisfiable) and aContent-Range: bytes */lengthheader, instead of a 206 or a response the client could not read. A range ending after the end of the entity (bytes=8-12on 10 bytes), or a suffix longer than it (bytes=-500), is cut at the end of the entity, instead of an invalidContent-Rangeor a broken response. An empty entity still ignores the header, and several ranges still get a 501. Tag.equals(Object)compared the names only since 2.7.0, whilehashCode()includes the weakness, and the flag ofTag.equals(Object, boolean)was inverted compared to its Javadoc and to Restlet 2.6. Both compare the weakness again as documented, soW/"a"no longer equals"a". Code comparing a tag parsed from a header withnew Tag("x")must usenew Tag("x", false), asnew Tag(String)creates a weak tag. Regression of 2.7.0.If-Rangeaccepted weak entity tags since 2.7.0, which RFC 9110 forbids (the partial content of a weak representation can be spliced with another one): it now uses the strong comparison, so a resource returning a weak tag (the default ofnew Tag(String)) answers aRangerequest with anIf-Rangewith a complete 200 response. Usenew Tag(value, false)for a strong tag. Regression of 2.7.0.If-None-Matchcompares the entity tags with the weak comparison whatever the method: since 2.7.0, a weak tag and a strong tag with the same name did not match on a PUT, POST or DELETE. Regression of 2.7.0.If-None-Match: *was ignored for a resource having an entity tag: a "create only" PUT overwrote the existing resource instead of getting a 412 (a GET did not get a 304). It is now false for any existing resource, as required by RFC 9110 section 13.1.2.*is also recognized when it is not the first tag of anIf-MatchorIf-None-Matchlist.If-Rangewith a date never matched when the modification date of the entity had milliseconds, asFileRepresentationhas, so clients could not resume a download. The dates are now compared with a precision of one second.
- A request whose preconditions fail (
-
Enhancements
- Documented that
new Tag()andnew Tag(String)create a weak entity tag, which is written asW/"value"and never matches anIf-MatchorIf-Rangecondition: usenew Tag(value, false)for a strong tag. The behaviour is unchanged. Issue #1694. Redirector.MODE_CLIENT_PERMANENT_STRICTanswers 308 (Permanent Redirect), which makes the client repeat the request with the same method and content, unlikeMODE_CLIENT_PERMANENT(301) that lets a user agent turn a POST into a GET. It comes withResponse.redirectPermanentStrict(...),ServerResource.redirectPermanentStrict(...)andRouter.redirectPermanentStrict(...). The Javadoc of the 301 helpers no longer promises that the method is kept. Issue #1746.
- Documented that
-
Misc
- Upgraded Jetty library to version 12.1.14. Issue #1515.
- Upgraded Jackson library to version 2.22.4.
- Upgraded org.json library to version 20260814.
- Upgraded the build tools: Maven wrapper to Maven 3.9.16 (wrapper 3.3.4), maven-bundle-plugin to 6.2.0, maven-enforcer-plugin to 3.7.0, maven-surefire-plugin to 3.6.1 and jacoco-maven-plugin to 0.8.16. With bnd 7 (maven-bundle-plugin 6.x), the
Import-Packageheader of theorg.restletbundle no longer lists thejava.*packages nor theorg.restlet.*packages it exports itself; theExport-Packageheaders are unchanged. - Deprecated the legacy RFC 2109/2965 cookie API (cookie version, comment and related constructors), to be removed in Restlet 3.0 in favor of RFC 6265.
- Added an optional origin matcher to CORS (
CorsService,CorsFilter,setAllowedOriginMatcher(Predicate<String>)) to accept origins that are not listed, for example any sub-domain. The response always contains the exact request origin; it has no effect while the allowed origins contain*. Issue #1611. - CorsService and CorsFilter now log a warning when
*is allowed as origin together with credentials (any web site could then send credentialed requests), and their Javadoc references the Fetch standard instead of the W3C CORS draft. Issue #1611. - Added an opt-in UTF-8 handling of the HTTP Basic credentials (RFC 7617), enabled with the
org.restlet.engine.security.basic.utf8system property (HttpBasicHelper.UTF8_PROPERTY): a Basic challenge then advertisescharset="UTF-8", a server decodes the credentials as UTF-8 (falling back to ISO-8859-1 if they are not valid UTF-8), and a client answering such a challenge encodes its credentials in UTF-8. Disabled by default (ISO-8859-1). Issue #1455. - Added the
ServerResource.hasPreconditions()andgetPreconditionStatus(RepresentationInfo)methods to add preconditions to the standard ones: override both, callingsuperto keep evaluating the conditional headers of the request. A request that only carries a custom precondition no longer skips the evaluation whenhasPreconditions()says so. The Javadoc ofdoConditionalHandle()now explains that the validators of a conditional PUT, POST or DELETE come fromgetInfo(), which callsget()by default. Issues #65 and #262. - Added
ServerResource.setIgnoringPreconditionsOnNonSuccess(boolean)andisIgnoringPreconditionsOnNonSuccess(). When enabled, the preconditions of a request (If-Match,If-None-Match, ...) are ignored if the status set byget()orgetInfo()while retrieving the validators is neither a success (2xx) nor 412, so that an error or a redirection set by the resource is no longer replaced by a 304 or a 412, as required by RFC 9110 section 13.2.1. Disabled by default (unchanged behavior), enabled in Restlet 3.0. Issue #129. - Added conditional writes on the client side:
ClientResourcegets per-call overloadsput,patchanddeletetakingConditions; they apply to that call only and are never retried.Conditions.unchangedSince(Response)builds an "If-Match" condition from the strong entity tag that was read, or an "If-Unmodified-Since" condition if the modification date can be deduced to be strong (the response date is at least one second after it, RFC 9110 section 8.8.2.2), and refuses to build an unconditional write otherwise.Conditions.ifAbsent()builds "If-None-Match: *" to create a resource only if it does not exist. A failed condition is reported as a 412ResourceException. Issue #100. - Added
Tag.strongMatch(Tag)andTag.weakMatch(Tag), the strong and weak comparison functions of RFC 9110 section 8.8.3.2.Tag.equals(Object, boolean)is deprecated in favor of them. - Added the
ServerResource.hasPreconditions()andgetPreconditionStatus(RepresentationInfo)methods to add preconditions to the standard ones: override both, callingsuperto keep evaluating the conditional headers of the request. A request that only carries a custom precondition no longer skips the evaluation whenhasPreconditions()says so. The Javadoc ofdoConditionalHandle()now explains that the validators of a conditional PUT, POST or DELETE come fromgetInfo(), which callsget()by default. Issues #65 and #262. - Added
ServerResource.setIgnoringPreconditionsOnNonSuccess(boolean)andisIgnoringPreconditionsOnNonSuccess(). When enabled, the preconditions of a request (If-Match,If-None-Match, ...) are ignored if the status set byget()orgetInfo()while retrieving the validators is neither a success (2xx) nor 412, so that an error or a redirection set by the resource is no longer replaced by a 304 or a 412, as required by RFC 9110 section 13.2.1. Disabled by default (unchanged behavior), enabled in Restlet 3.0. Issue #129. - Added the constants of the HTTP statuses 308 (
Status.REDIRECTION_PERMANENT_STRICT), 421, 422 (CLIENT_ERROR_UNPROCESSABLE_CONTENT), 426, 428, 431, 451 and 511 of RFC 6585, RFC 9110 and RFC 7725, with their reason phrase, description and URI.Status.valueOf()returned a status without any of them. Issue #850. - Added the
CacheDirectivefactoriesmustUnderstand()(RFC 9111),immutable()(RFC 8246),staleWhileRevalidate(int)andstaleIfError(int)(RFC 5861), with theirHeaderConstants.CACHE_*names. The two numeric ones reject a negative number of seconds. - The Javadoc of
ServerResource.getPreconditionStatus()shows how to require conditional writes by answering 428 (Status.CLIENT_ERROR_PRECONDITION_REQUIRED) to a write without precondition.
-
-
2.7.0 (30-09-2026)
- Misc
- Upgraded Freemarker library to version 2.3.35.
- Upgraded Jackson library to version 2.22.3.
- Upgraded Jetty library to version 12.0.39.
- Upgraded Swagger library to version 2.2.55.
- Upgraded Swagger parser library to version 2.1.48.
- Misc
-
2.7 Release Candidate 1 (23-07-2026)
- Misc
- Upgraded Gson library to version 2.14.0.
- Upgraded Jackson library to version 2.21 (LTS).
- Upgraded Jetty library to version 2.0.36.
- Upgraded JSON library to version 20260522.
- Upgraded Slf4j library to version 2.0.18.
- Upgraded Springframework library to version 7.0.8.
- Upgraded Swagger library to version 2.2.50.
- Upgraded Swagger parser library to version 2.1.43.
- Upgraded Thymeleaf library to version 3.1.5.RELEASE.
- Misc
-
2.7 Milestone 3 (10-06-2026)
- Enhancements
- New OpenApi extension (OAS 3.1 only). Contributed by Antoine Nicolas.
- Bugs fixed
- Reuse an instance of Random class in RandomUtils. Issue #1487.
- Complete test classes. Issue #1490.
- Avoid non-short-circuit logic in FileClientHelper. Issue #1495.
- Drop the implementations of the clone method. Issue #1498.
- Enhancements
-
2.7 Milestone 2 (29-06-2025)
- Misc
- Removed deprecated Servlet extension and related classes in Spring extension
- Removed deprecated methods in Restlet API
- Removed internal HTTP and FTP connectors
- Merged the Jetty client and server HTTP connector into Restlet Engine (new default connectors)
- Misc
-
2.7 Milestone 1 (21-06-2025)
- Misc
- Removed deprecated extension Atom, Guice, GWT, JAXB, OData
- Removed edition GWT
- Misc