Skip to content

Document that new Tag(String) creates a weak entity tag (#1694) - #1762

Merged
thboileau-git merged 1 commit into
2.7from
fix/1694-tag-strong-by-default-2.7
Nov 29, 2026
Merged

thboileau-git merged 1 commit into
2.7from
fix/1694-tag-strong-by-default-2.7

Conversation

@thboileau-git

@thboileau-git thboileau-git commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #1694 (the behaviour change is in 3.0 only)

new Tag() and new Tag(String) create a weak entity tag in this version, whereas RFC 9110 section 8.8.3 defines a tag as strong unless it carries the W/ prefix: the tag is written as W/"value" and never matches an If-Match or If-Range condition (strong comparison). Changing it in a maintenance version would silently alter the ETag header of existing servers, so the behaviour is unchanged.

  • Javadoc warning on Tag() and Tag(String), pointing to new Tag(value, false) for a strong tag, and saying that Restlet 3.0 creates a strong tag.
  • changes.md: one line under Enhancements.
  • No code change, no new test.

Same change on the other maintained versions: PR #1761 (3.0) and #1763 (2.6)

🤖 Generated with Claude Code

RFC 9110 section 8.8.3 defines an entity tag as strong unless it carries the
"W/" prefix, whereas Tag() and Tag(String) create a weak tag, written as
W/"value", which never matches an If-Match or If-Range condition. The behaviour
is not changed in this maintenance version (it would alter the ETag header of
existing servers); the Javadoc says so and points to new Tag(value, false).
Restlet 3.0 creates a strong tag.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@thboileau-git
thboileau-git merged commit 205e4a9 into 2.7 Nov 29, 2026
6 checks passed
@thboileau-git
thboileau-git deleted the fix/1694-tag-strong-by-default-2.7 branch November 29, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants