Skip to content

Commit

Permalink
UTF-8 fix
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1676 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
allo committed Feb 16, 2006
1 parent a4b3981 commit 2d4e132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/de/anomic/http/httpd.java
Expand Up @@ -1228,7 +1228,7 @@ public static final void sendRespondHeader(
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));
Expand Down Expand Up @@ -1284,7 +1284,7 @@ else if (httpVersion.equals(httpHeader.HTTP_VERSION_1_1) && httpHeader.http1_1.c
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))
Expand Down

0 comments on commit 2d4e132

Please sign in to comment.