git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1676 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent a4b3981f33
commit 2d4e1325cf

@ -1228,7 +1228,7 @@ public final class httpd implements serverHandler {
if (httpVersion.toUpperCase().equals(httpHeader.HTTP_VERSION_1_1)) headers.put(httpHeader.CACHE_CONTROL, "no-cache");
else headers.put(httpHeader.PRAGMA, "no-cache");
}
headers.put(httpHeader.CONTENT_TYPE, (contentType == null)? "text/html" : contentType);
headers.put(httpHeader.CONTENT_TYPE, (contentType == null)? "text/html; charset=UTF-8" : contentType+"; charset=UTF-8");
if (contentLength > 0) headers.put(httpHeader.CONTENT_LENGTH, Long.toString(contentLength));
//if (cookie != null) headers.put(httpHeader.SET_COOKIE, cookie);
if (expires != null) headers.put(httpHeader.EXPIRES, httpc.dateString(expires));
@ -1284,7 +1284,7 @@ public final class httpd implements serverHandler {
if (!header.containsKey(httpHeader.DATE))
header.put(httpHeader.DATE, httpc.dateString(httpc.nowDate()));
if (!header.containsKey(httpHeader.CONTENT_TYPE))
header.put(httpHeader.CONTENT_TYPE, "text/html"); // fix this
header.put(httpHeader.CONTENT_TYPE, "text/html; charset=UTF-8"); // fix this
if (!header.containsKey(httpHeader.CONNECTION) && conProp.containsKey(httpHeader.CONNECTION_PROP_PERSISTENT))
header.put(httpHeader.CONNECTION, conProp.getProperty(httpHeader.CONNECTION_PROP_PERSISTENT));
if (!header.containsKey(httpHeader.PROXY_CONNECTION) && conProp.containsKey(httpHeader.CONNECTION_PROP_PERSISTENT))

Loading…
Cancel
Save