-Adding Windows Media to types which are not sended compressed

-Renaming writeandzip to writeandgzip to avoid confusion about type of compression
-Adding new startup message to windows script
-The usual language "enhancements" ;-)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1953 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
rramthun 19 years ago
parent 2ed4fa96b7
commit 42b0b10a95

@ -104,7 +104,7 @@ public class ConfigSkins_p {
}
//if there are no skins, use the current style as default
//normally only invoked at first start of YACY
//normally only invoked at first start of YaCy
if(skinFiles.length == 0){
copyFile(new File(env.getRootPath(), "htroot/env/style.css"), new File(skinPath, "default.css"));
env.setConfig("currentSkin", "default");
@ -120,14 +120,14 @@ public class ConfigSkins_p {
File skinfile= new File(skinPath, (String)post.get("skin"));
skinfile.delete();
//load Skin from URL
//load skin from URL
} else if (post.containsKey("url")){
String url = (String)post.get("url");
ArrayList skinVector;
try{
skinVector = httpc.wget(new URL(url), 6000, null, null, switchboard.remoteProxyConfig);
}catch(IOException e){
prop.put("status", 1);//unable to get url
prop.put("status", 1);//unable to get URL
prop.put("status_url", url);
return prop;
}
@ -151,7 +151,7 @@ public class ConfigSkins_p {
}
//reread Skins
//reread skins
skinFiles = listManager.getDirListing(skinPath);
int i;
for(i=0;i<= skinFiles.length-1;i++){

@ -89,8 +89,10 @@ public final class httpd implements serverHandler {
* using zipped content encoding
* @see #shallTransportZipped(String)
*/
//TODO: Load this from a file
private static final HashSet disallowZippedContentEncoding = new HashSet(Arrays.asList(new String[]{
".gz", ".tgz", ".jpg", ".jpeg", ".gif", ".zip", ".rar", ".bz2", ".lha", ".jar", ".rpm", ".arc", ".arj"
".gz", ".tgz", ".jpg", ".jpeg", ".gif", ".zip", ".rar", ".bz2", ".lha", ".jar", ".rpm", ".arc", ".arj", ".wmv"
}));
// static objects

@ -159,17 +159,17 @@ public final class serverFileUtils {
}
}
public static void writeAndZip(byte[] source, File dest) throws IOException {
public static void writeAndGZip(byte[] source, File dest) throws IOException {
FileOutputStream fos = null;
try {
fos = new FileOutputStream(dest);
writeAndZip(source, fos);
writeAndGZip(source, fos);
} finally {
if (fos != null) try {fos.close();} catch (Exception e) {}
}
}
public static void writeAndZip(byte[] source, OutputStream dest) throws IOException {
public static void writeAndGZip(byte[] source, OutputStream dest) throws IOException {
GZIPOutputStream zipOut = null;
try {
zipOut = new GZIPOutputStream(dest);
@ -288,7 +288,7 @@ public final class serverFileUtils {
public static void main(String[] args) {
try {
writeAndZip("ein zwei drei, Zauberei".getBytes(), new File("zauberei.txt.gz"));
writeAndGZip("ein zwei drei, Zauberei".getBytes(), new File("zauberei.txt.gz"));
} catch (IOException e) {
e.printStackTrace();
}

@ -114,9 +114,9 @@ public class yacyPeerActions {
}
//the speed of indexing (pages/minute) of the peer
if(uptimediff==0){
if(uptimediff<=0){
//no timedelta. we cannot calculate a new value
}else if(indexedcdiff==0){
}else if(indexedcdiff<=0){
//no indexing in the time...
seedDB.mySeed.put(yacySeed.ISPEED, Long.toString(0));
}else{
@ -162,7 +162,7 @@ public class yacyPeerActions {
yacyCore.log.logInfo("BOOTSTRAP: " + sc + " seeds known from previous run");
// - load the superseed: a list of URL's
// - load the superseed: a list of URLs
disorderSet superseed = loadSuperseed(superseedFile, superseedURL);
// - use the superseed to further fill up the seedDB

@ -221,7 +221,7 @@ public final class yacy {
serverLog.logConfig("STARTUP", "java version " + System.getProperty("java.version", "no-java-version"));
serverLog.logConfig("STARTUP", "Application Root Path: " + homePath);
serverLog.logConfig("STARTUP", "Time Zone: UTC" + serverDate.UTCDiffString() + "; UTC+0000 is " + System.currentTimeMillis());
serverLog.logConfig("STARTUP", "Maximum file systen path length: " + serverSystem.maxPathLength);
serverLog.logConfig("STARTUP", "Maximum file system path length: " + serverSystem.maxPathLength);
// create data folder
final File dataFolder = new File(homePath, "DATA");

@ -14,9 +14,19 @@ set javacmd=-Xmx64m -Xms10m
if exist DATA\SETTINGS\httpProxy.conf GoTo :GETJAVACMD
:STARTJAVA
Rem Starting yacy
Echo Generated Classpath:%CLASSPATH%
Rem Starting YaCy
Echo Generated classpath:%CLASSPATH%
Echo JRE Parameters:%javacmd%
Echo ****************** YaCy Web Crawler/Indexer & Search Engine *******************
Echo **** (C) by Michael Peter Christen, usage granted unter the GPL Version 2 ****
Echo **** USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/yacy **
Echo ** LOG of YaCy: DATA/LOG/yacy00.log (and yacy<xx>.log) **
Echo ** STOP YaCy: execute stopYACY.sh and wait some seconds **
Echo ** GET HELP for YaCy: see www.yacy-websearch.net/wiki and www.yacy-forum.de **
Echo *******************************************************************************
Echo >> YaCy started as daemon process. Administration at http://localhost:8080 <<
java %javacmd% -classpath %CLASSPATH% yacy
GoTo :END

@ -2,7 +2,7 @@
if [ $UID -eq 0 ]
then
echo
echo "For security reasons, you should not run this script as root!"
echo "For security reasons you should not run this script as root!"
echo
exit 1
elif [ ! -x "`which java`" ]
@ -56,7 +56,7 @@ else
# nohup java -Xms160m -Xmx160m -classpath classes:htroot:$CLASSPATH yacy > /dev/null &
fi
echo "****************** YaCy Web Crawler/Indexer & Search Engine *******************"
echo "**** (C) by Michael Peter Christen, usage granted unter the GPL Version. 2 ****"
echo "**** (C) by Michael Peter Christen, usage granted unter the GPL Version 2 ****"
echo "**** USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/yacy **"
echo "** LOG of YaCy: DATA/LOG/yacy00.log (and yacy<xx>.log) **"
echo "** STOP YaCy: execute stopYACY.sh and wait some seconds **"

Loading…
Cancel
Save