Skip to content

HttpMethod.valueOf() does not perform case-insensitive lookup #36518

@wbrco

Description

@wbrco

Spent several hours troubleshooting 400 responses where lower case values were being parsed by HttpMethod.valueOf(). when used with WebClient.method().

Please either:

  • Update the API documentation stating that the method doesn't normalize the value to uppercase.
  • In the method, perform a .toUpperCase() before passing it to the switch statement.
  • Or thow an IllegalArgumentException when a lower case string is passed.

Sometimes it's the little things that count!

Thank You!

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: waiting-for-triageAn issue we've not yet triaged or decided on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions