Upgrade SiteMesh to 3.3.0-M3#15975
Merged
Merged
Conversation
M3 fixes the response charset in the view-resolver integration: the buffering view no longer stamps a charset-less text/html default onto the response before the inner view renders, so GSP's configured UTF-8 content type is applied instead of the container's locale-derived charset. Before this, decorated pages served most non-English locales as ISO-8859-1, garbling all non-Latin-1 text. The release also makes enableBuffering the public API for unconditional buffering, replaces the wrap-all default with a non-invasive delegating resolver (Grails' bean-definition/bean-instance integrations are unaffected and keep priority through the extension contract), adds SiteMeshViewResolver.decorate(View) for handler-returned views, defers SiteMeshViewContext creation until the rendered content type is known, binds the starter's early post-processors from the Environment, and centralizes decorator-chain parsing. Verified against the released artifact: :grails-sitemesh3:test and the gsp-sitemesh3 functional suite pass, and a generated application serves all 18 bundled locales as charset=UTF-8 with byte-valid content.
jdaugherty
approved these changes
Jul 11, 2026
Contributor
|
This is required for us to reroll the 8.0.0-M3 release. I've tested the apps locally and tests and see no issues. I'm merging so we can get teh release out. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #15975 +/- ##
==================================================
- Coverage 49.6709% 49.6698% -0.0011%
Complexity 17017 17017
==================================================
Files 2004 2004
Lines 93896 93896
Branches 16448 16448
==================================================
- Hits 46639 46638 -1
- Misses 40078 40079 +1
Partials 7179 7179 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
spring-boot-starter-sitemesh/spring-webmvc-sitemeshfrom3.3.0-M2to3.3.0-M3.Why
M3 fixes the response charset in the view-resolver integration. Under M2,
SiteMeshViewstamped a charset-lesstext/htmlonto the real response before the inner view rendered. Grails GSP only applies its configured content type (text/html;charset=UTF-8) when none is set yet, so it backed off — and the response went out with the servlet container's locale-derived charset instead. Net effect: decorated pages served most non-English locales as ISO-8859-1, destroying all non-Latin-1 text (Cyrillic, Thai, Chinese, Czech, ...). Only locales whose container mapping happened to be UTF-8 rendered correctly.M3 lets the inner view own the content type (
enableBufferingis now the public API for unconditional buffering) and restores thetext/htmldefault only when the view declines to set one.Also in M3
ViewResolverbean is replaced or retyped. Grails'bean-definition/bean-instanceintegrations are unaffected and keep priority through the starter's extension contract (verified: single decoration pass).SiteMeshViewResolver.decorate(View)for views a handler resolves manually and returns directly.SiteMeshViewContextis created after the render, so custom content processors and decorator selectors observe the actual response content type.sitemesh.*from theEnvironment, sowrapMode=bean-definitionno longer ignores a configuredtargetBeanName."inner, outer"works in meta tags, request attributes, and configuration alike).Verification (against the released Central artifact)
:grails-sitemesh3:test— green (forced rerun):grails-test-examples-gsp-sitemesh3:check— 21 integration tests green (forced rerun), covering forced layouts, decorator chaining, JSP, plain text, and error-page decorationcharset=UTF-8with strict byte-level validation of the translated contentCompanion to #15974, which internationalizes the default welcome page — correct rendering of its non-Latin-1 locales depends on this upgrade.