Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- fixed wrong replacement of POST-parameters in httpd ('<' and '>' are still replaced, don't know why): http://www.yacy-forum.de/viewtopic.php?t=3466

karlchenofhell2401e748a3d5
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 4d510ac3b..e79943b2f 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -18,7 +18,7 @@
#%env/templates/header.template%#
#(/display)#
- <form class="search small" action="yacysearch.html" method="get">
+ <form class="search small" action="yacysearch.html" method="get" accept-charset="UTF-8">
<p class="yacylogo"><a href="http://yacy.net/yacy/" class="yacylogo"><img src="/env/grafics/yacy.png" alt="yacy" /></a></p>
<h2>#[promoteSearchPageGreeting]#</h2>
<div>
diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java
index 6caf2d859..23732cb4f 100644
--- a/source/de/anomic/http/httpd.java
+++ b/source/de/anomic/http/httpd.java
@@ -823,10 +823,6 @@ public final class httpd implements serverHandler {
} catch (UnsupportedEncodingException e) { return null; }
}
- public static void main(String[] args) {
- System.out.println(Charset.availableCharsets().toString().replaceAll(" ", "\n"));
- }
-
// 06.01.2007: decode HTML entities by [FB]
public static String decodeHtmlEntities(String s) {
// replace all entities defined in wikiCode.characters and htmlentities
@@ -968,12 +964,12 @@ public final class httpd implements serverHandler {
java.lang.System.arraycopy(buffer, pos, line, 0, q - pos);
// in the 'line' variable we have now either a normal value or an uploadef file
if (filename == null) {
- args.put(new String(name, "UTF-8"), new String(line, "UTF-8"));
+ args.putASIS(new String(name, "UTF-8"), new String(line, "UTF-8"));
} else {
// we store the file in a hashtable.
// we use the same key to address the file in the hashtable as we
// use to address the filename in the properties, but without leading '&'
- args.put(new String(name, "UTF-8"), new String(filename, "UTF-8"));
+ args.putASIS(new String(name, "UTF-8"), new String(filename, "UTF-8"));
files.put(new String(name, "UTF-8"), line);
}
argc++;