Author: jflesch
Date: 2006-12-09 17:10:50 +0000 (Sat, 09 Dec 2006)
New Revision: 11318
Modified:
trunk/apps/Thaw/src/thaw/plugins/index/Index.java
trunk/apps/Thaw/src/thaw/plugins/insertPlugin/DefaultMIMETypes.java
Log:
Update MIME types and index extension
Modified: trunk/apps/Thaw/src/thaw/plugins/index/Index.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Index.java 2006-12-09 17:07:01 UTC
(rev 11317)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Index.java 2006-12-09 17:10:50 UTC
(rev 11318)
@@ -247,7 +247,7 @@
else
tmpdir = tmpdir + java.io.File.separator;
- targetFile = new java.io.File(tmpdir + realName +".xml");
+ targetFile = new java.io.File(tmpdir + realName +".frdx");
if (transfer != null) {
Logger.notice(this, "A transfer is already running");
@@ -276,6 +276,7 @@
revision++;
clientPut = new FCPClientPut(targetFile, 2,
revision, realName, privateKey, 2, true, 0);
+ clientPut.setMetadata("ContentType",
"application/x-freenet-index");
transfer = clientPut;
clientPut.addObserver(this);
@@ -482,9 +483,9 @@
if (publicKey.startsWith("SSK@")) { /* as it should when
privateKey is known */
if (publicKey.endsWith("/"))
- return publicKey.replaceFirst("SSK@",
"USK@")+realName+"/"+revision+"/"+realName+".xml";
+ return publicKey.replaceFirst("SSK@",
"USK@")+realName+"/"+revision+"/"+realName+".frdx";
else
- return publicKey.replaceFirst("SSK@",
"USK@")+"/"+realName+"/"+revision+"/"+realName+".xml";
+ return publicKey.replaceFirst("SSK@",
"USK@")+"/"+realName+"/"+revision+"/"+realName+".frdx";
} else
return publicKey;
}
@@ -1194,6 +1195,7 @@
return null;
name = name.replaceAll(".xml", "");
+ name = name.replaceAll(".frdx", "");
return name;
}
Modified: trunk/apps/Thaw/src/thaw/plugins/insertPlugin/DefaultMIMETypes.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/insertPlugin/DefaultMIMETypes.java
2006-12-09 17:07:01 UTC (rev 11317)
+++ trunk/apps/Thaw/src/thaw/plugins/insertPlugin/DefaultMIMETypes.java
2006-12-09 17:10:50 UTC (rev 11318)
@@ -741,6 +741,9 @@
DefaultMIMETypes.addMIMEType((short)610, "video/x-sgi-movie",
"movie");
DefaultMIMETypes.addMIMEType((short)611,
"x-conference/x-cooltalk", "ice");
DefaultMIMETypes.addMIMEType((short)612, "x-world/x-vrml", "vrm
vrml wrl", "vrml");
+ DefaultMIMETypes.addMIMEType((short)613,
"application/x-freenet-reference", "fref");
+ DefaultMIMETypes.addMIMEType((short)614,
"application/x-freenet-index", "fidx");
+ DefaultMIMETypes.addMIMEType((short)615,
"application/x-freenet-blob", "flob");
}
/** Guess a MIME type from a filename */