mirror of
https://github.com/yacy/yacy_search_server.git
synced 2026-10-25 05:54:15 +00:00
Merge pull request #812 from smokingwheels/fix-performancequeues-unresolved-pattern
Fix language preference cookie response header compile error
This commit is contained in:
1 file changed
+10
-2
@@ -663,9 +663,17 @@ public class yacysearch {
|
|||||||
if (languageFromParam) {
|
if (languageFromParam) {
|
||||||
final ResponseHeader outgoingHeader = prop.getOutgoingHeader();
|
final ResponseHeader outgoingHeader = prop.getOutgoingHeader();
|
||||||
if (modifier.language != null) {
|
if (modifier.language != null) {
|
||||||
outgoingHeader.setCookie("yacy-language", "lang_" + modifier.language, 365 * 24 * 60 * 60, "/", null, false);
|
outgoingHeader.add(
|
||||||
|
HeaderFramework.SET_COOKIE,
|
||||||
|
"yacy-language=lang_" + modifier.language +
|
||||||
|
"; Max-Age=" + (365 * 24 * 60 * 60) +
|
||||||
|
"; Path=/"
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
outgoingHeader.setCookie("yacy-language", "", 0, "/", null, false);
|
outgoingHeader.add(
|
||||||
|
HeaderFramework.SET_COOKIE,
|
||||||
|
"yacy-language=; Max-Age=0; Path=/"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
prop.setOutgoingHeader(outgoingHeader);
|
prop.setOutgoingHeader(outgoingHeader);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user