Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xwiki-platform
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XWiki
xwiki-platform
Commits
d99a8bea
Commit
d99a8bea
authored
1 year ago
by
Vincent Massol
Browse files
Options
Downloads
Patches
Plain Diff
XWIKI-21793: Read-Only stack trace in the logs with Jetty 12
parent
d8c16692
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/stats/impl/StatsUtil.java
+9
-5
9 additions, 5 deletions
...ore/src/main/java/com/xpn/xwiki/stats/impl/StatsUtil.java
with
9 additions
and
5 deletions
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/stats/impl/StatsUtil.java
+
9
−
5
View file @
d99a8bea
...
...
@@ -663,13 +663,17 @@ protected static Cookie addCookie(XWikiContext context)
cookie
.
setDomain
(
cookieDomain
);
}
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"Setting cookie "
+
cookie
.
getValue
()
+
" for name "
+
cookie
.
getName
()
+
" with domain "
+
cookie
.
getDomain
()
+
" and path "
+
cookie
.
getPath
()
+
" and maxage "
+
cookie
.
getMaxAge
());
// TODO: Fix the code below. It's called after the response has been flushed in XWikiAction and thus the
// cookie is not added. To prevent any stack trace in the logs, we have added the IF on the response.
// However, this whole logic needs to be reviewed since right now it means this cookie is never set.
if
(!
context
.
getResponse
().
isCommitted
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"Setting cookie "
+
cookie
.
getValue
()
+
" for name "
+
cookie
.
getName
()
+
" with domain "
+
cookie
.
getDomain
()
+
" and path "
+
cookie
.
getPath
()
+
" and maxage "
+
cookie
.
getMaxAge
());
}
context
.
getResponse
().
addCookie
(
cookie
);
}
context
.
getResponse
().
addCookie
(
cookie
);
return
cookie
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment