Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Changes log
- `If-Range` with a date never matched when the modification date of the entity had milliseconds, as `FileRepresentation` has, so clients could not resume a download. The dates are now compared with a precision of one second.

- Enhancements
- Documented that `new Tag()` and `new Tag(String)` create a weak entity tag, which is written as `W/"value"` and never matches an `If-Match` or `If-Range` condition: use `new Tag(value, false)` for a strong tag. The behaviour is unchanged. Issue #1694.
- `Redirector.MODE_CLIENT_PERMANENT_STRICT` answers 308 (Permanent Redirect), which makes the client repeat the request with the same method and content, unlike `MODE_CLIENT_PERMANENT` (301) that lets a user agent turn a POST into a GET. It comes with `Response.redirectPermanentStrict(...)`, `ServerResource.redirectPermanentStrict(...)` and `Router.redirectPermanentStrict(...)`. The Javadoc of the 301 helpers no longer promises that the method is kept. Issue #1746.
- Misc
- Upgraded Jetty library to version 12.1.14. Issue #1515.
Expand Down
10 changes: 8 additions & 2 deletions org.restlet/src/main/java/org/restlet/data/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,20 @@ public static Tag parse(String httpTag) {

/**
* Default constructor. The opaque tag is set to null, and the weakness indicator is set to
* true.
* true: <b>the tag is weak</b>, see {@link #Tag(String)}.
*/
public Tag() {
this(null, true);
}

/**
* Constructor of weak tags.
* Constructor of weak tags.<br>
* <br>
* Note that RFC 9110 section 8.8.3 defines an entity tag as strong unless it carries the "W/"
* prefix, whereas this constructor creates a <b>weak</b> tag: it is written as {@code
* W/"value"} and never matches an "If-Match" or "If-Range" condition (strong comparison). To
* create a tag that clients can use to update or resume a representation, use {@code new
* Tag(value, false)}. Restlet 3.0 creates a strong tag here.
*
* @param opaqueTag The tag value.
*/
Expand Down
Loading