Skip to content

Spring WebFlux fails with 500 if Accept-Language is set to an empty string [SPR-15603] #20162

Closed
@spring-projects-issues

Description

@spring-projects-issues

Oleg Alexeyev opened SPR-15603 and commented

31.05.2017 20:45:06,914 ERROR [org.springframework.web.server.handler.ExceptionHandlingWebHandler] - Could not complete request
java.lang.IllegalArgumentException: range=
	at java.util.Locale$LanguageRange.<init>(Locale.java:2913) ~[?:1.8.0_131]
	at sun.util.locale.LocaleMatcher.parse(LocaleMatcher.java:284) ~[?:1.8.0_131]
	at java.util.Locale$LanguageRange.parse(Locale.java:3028) ~[?:1.8.0_131]
	at org.springframework.http.HttpHeaders.getAcceptLanguage(HttpHeaders.java:471) ~[spring-web-5.0.0.M5.jar:5.0.0.M5]
	at org.springframework.http.HttpHeaders.getAcceptLanguageAsLocale(HttpHeaders.java:492) ~[spring-web-5.0.0.M5.jar:5.0.0.M5]
	at org.springframework.web.reactive.result.view.ViewResolutionResultHandler.lambda$handleResult$3(ViewResolutionResultHandler.java:214) ~[spring-webflux-5.0.0.M5.jar:5.0.0.M5]
	at reactor.core.publisher.MonoThenMap$ThenMapMain.onNext(MonoThenMap.java:120) ~[reactor-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
...

Affects: 5.0 RC1

Issue Links:

Referenced from: commits e81651b

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions