Comment From: lllichen

Spring When Accept-Language header is blank, the default locale should be returned

Comment From: bclozel

Sending such a request header with an "empty text" value is I think invalid HTTP. Can you name an HTTP client that does this?

Comment From: ririnto

I don't think this is a common case.

Is there a case where this change would be useful?

Comment From: lllichen

Sending such a request header with an "empty text" value is I think invalid HTTP. Can you name an HTTP client that does this?

Sending such a request header with an "empty text" value is I think invalid HTTP. Can you name an HTTP client that does this?

I think what you said is correct. However, sometimes the "accept_language" is manually added by the front-end colleagues. If they don't include this, I expect the return value to be the default value that I have set, rather than the default language of the machine.

Comment From: lllichen

Of course, this is just my suggestion. I've already overridden this class locally to solve this problem.

Comment From: bclozel

Thanks for letting us know. Let's consider this an invalid usage right now.