Skip to content

AbstractRequestLoggingFilter appends null query string [SPR-14244] #18817

@spring-projects-issues

Description

@spring-projects-issues

M. Justin opened SPR-14244 and commented

When using AbstractRequestLogingFilter to log requests with includeQueryString = true, "?null" is appended to requests that don't have a query string. I would expect no query string to be included in these cases.

@Bean
public Filter logFilter() {
    CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter();
    filter.setIncludeQueryString(true);
    return filter;
}

Log output:

Before request [uri=/my/uri/path?null]

Expected log output:

Before request [uri=/my/uri/path]

Affects: 3.2.16, 4.2.5

Issue Links:

Backported to: 3.2.17

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions