Skip to content

[UNDERTOW-2370] Guard against non-servlet ctx request with ServletNam… #1758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baranowb
Copy link
Contributor

…eAttribute in access log
Issue: https://issues.redhat.com/browse/UNDERTOW-2370

@baranowb baranowb requested review from ropalka and fl4via July 15, 2025 07:02
@baranowb baranowb added bug fix Contains bug fix(es) enhancement Enhances existing behaviour or code labels Jul 15, 2025
if (src != null) {
return src.getCurrentServlet().getManagedServlet().getServletInfo().getName();
} else {
return UNDEFINED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the reasoning behind intentionally returning "No-Servlet" here?

I was thinking that returning null would be sufficient, as it gets logged as - in the access log by default. This would also align with other ExchangeAttributes, which typically return null when a value isn't available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Contains bug fix(es) enhancement Enhances existing behaviour or code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants