Skip to content

NullPointerException with empty X-Forwarded-For header #16044

@luiz290788

Description

@luiz290788

spring-boot: 2.1.3
spring-boot-actuator: 2.1.3

A NullPointerException is thrown in line 49 of ServerWebExchangeTraceableRequest because request.getRemoteAddress().getAddress() is null when you make a request with an empty X-Forwarded-For header.

You can reproduce it with a request like this

GET http://localhost:8080/some-path
X-Forwarded-For: 

The path doesn't matter because the request doesn't reach the routing system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by anothertype: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions