Skip to content

Commit 313ac67

Browse files
committed
Fixed locale header
1 parent fb70dd7 commit 313ac67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/javawebstack/httpserver/Exchange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public Exchange redirect(String url) {
181181
}
182182

183183
public List<Locale> locales() {
184-
String locale = socket.getRequestHeader("locale");
184+
String locale = socket.getRequestHeader("accept-language");
185185
if(locale == null)
186186
return new ArrayList<>();
187187
return Stream.of(locale.split(" ?,")).map(s -> s.split(";")[0]).map(Locale::forLanguageTag).collect(Collectors.toList());

0 commit comments

Comments
 (0)