Author: j16sdiz
Date: 2008-12-22 03:06:08 +0000 (Mon, 22 Dec 2008)
New Revision: 24720
Modified:
trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
trunk/freenet/src/freenet/clients/http/QueueToadlet.java
trunk/freenet/src/freenet/keys/FreenetURI.java
Log:
fix typo, deprecate old method
Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2008-12-22
03:05:32 UTC (rev 24719)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2008-12-22
03:06:08 UTC (rev 24720)
@@ -457,7 +457,7 @@
if(Logger.shouldLog(Logger.MINOR, this))
Logger.minor(this, "Failed to fetch "+uri+" :
"+e);
if(e.newURI != null) {
- Toadlet.writePermanentRedirect(ctx, msg, '/'
+e.newURI.toACIIString() + override);
+ Toadlet.writePermanentRedirect(ctx, msg, '/'
+e.newURI.toASCIIString() + override);
} else if(e.mode == FetchException.TOO_BIG) {
HTMLNode pageNode =
ctx.getPageMaker().getPageNode(l10n("fileInformationTitle"), ctx);
HTMLNode contentNode =
ctx.getPageMaker().getContentNode(pageNode);
@@ -604,7 +604,7 @@
boolean forceDownload) {
StringBuilder sb = new StringBuilder();
sb.append("/");
- sb.append(uri.toACIIString());
+ sb.append(uri.toASCIIString());
char c = '?';
if(requestedMimeType != null) {
sb.append(c).append("type=").append(URLEncoder.encode(requestedMimeType,false));
c = '&';
Modified: trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
2008-12-22 03:05:32 UTC (rev 24719)
+++ trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
2008-12-22 03:06:08 UTC (rev 24720)
@@ -53,7 +53,7 @@
}
String extra = "";
if(furi != null)
- extra = "&key="+furi.toACIIString();
+ extra = "&key="+furi.toASCIIString();
String path = request.getParam("path");
if (path.length() == 0) {
@@ -128,7 +128,7 @@
formNode.addChild("input", new
String[] { "type", "name", "value" }, new String[] { "hidden", "filename",
currentFile.getAbsolutePath() });
formNode.addChild("input", new
String[] { "type", "name", "value" }, new String[] { "submit",
"insert-local-dir", l10n("insert")});
if(furi != null)
-
formNode.addChild("input", new String[] { "type", "name", "value" }, new
String[] { "hidden", "key", furi.toACIIString() });
+
formNode.addChild("input", new String[] { "type", "name", "value" }, new
String[] { "hidden", "key", furi.toASCIIString() });
HTMLNode directoryCellNode =
fileRow.addChild("td");
directoryCellNode.addChild("a",
"href", "?path=" +
URLEncoder.encode(currentFile.getAbsolutePath(),false)+extra,
currentFile.getName());
} else {
@@ -143,7 +143,7 @@
formNode.addChild("input", new
String[] { "type", "name", "value" }, new String[] { "hidden", "filename",
currentFile.getAbsolutePath() });
formNode.addChild("input", new
String[] { "type", "name", "value" }, new String[] { "submit",
"insert-local-file", l10n("insert")});
if(furi != null)
-
formNode.addChild("input", new String[] { "type", "name", "value" }, new
String[] { "hidden", "key", furi.toACIIString() });
+
formNode.addChild("input", new String[] { "type", "name", "value" }, new
String[] { "hidden", "key", furi.toASCIIString() });
fileRow.addChild("td",
currentFile.getName());
fileRow.addChild("td", "class",
"right-align", String.valueOf(currentFile.length()));
} else {
Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2008-12-22
03:05:32 UTC (rev 24719)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2008-12-22
03:06:08 UTC (rev 24720)
@@ -127,7 +127,7 @@
}
MultiValueTable<String, String> responseHeaders
= new MultiValueTable<String, String>();
- responseHeaders.put("Location",
"/files/?key="+insertURI.toACIIString());
+ responseHeaders.put("Location",
"/files/?key="+insertURI.toASCIIString());
ctx.sendReplyHeaders(302, "Found",
responseHeaders, null, 0);
return;
}
@@ -1335,7 +1335,7 @@
HTMLNode text = new HTMLNode("div");
L10n.addL10nSubstitution(text,
"QueueToadlet.downloadSucceeded",
new String[] { "link", "/link",
"origlink", "/origlink", "filename", "size" },
- new String[] { "<a
href=\"/queue/"+uri.toACIIString()+"\">", "</a>", "<a
href=\"/"+uri.toACIIString()+"\">", "</a>", name, SizeUtil.formatSize(size) } );
+ new String[] { "<a
href=\"/queue/"+uri.toASCIIString()+"\">", "</a>", "<a
href=\"/"+uri.toASCIIString()+"\">", "</a>", name, SizeUtil.formatSize(size) }
);
UserAlert alert =
new SimpleHTMLUserAlert(true, title, title, text,
UserAlert.MINOR) {
@Override
@@ -1369,7 +1369,7 @@
HTMLNode text = new HTMLNode("div");
L10n.addL10nSubstitution(text,
"QueueToadlet.uploadSucceeded",
new String[] { "link", "/link",
"filename", "size" },
- new String[] { "<a
href=\"/"+uri.toACIIString()+"\">", "</a>", name, SizeUtil.formatSize(size) } );
+ new String[] { "<a
href=\"/"+uri.toASCIIString()+"\">", "</a>", name, SizeUtil.formatSize(size) }
);
UserAlert alert =
new SimpleHTMLUserAlert(true, title, title, text,
UserAlert.MINOR) {
@Override
@@ -1400,7 +1400,7 @@
HTMLNode text = new HTMLNode("div");
L10n.addL10nSubstitution(text,
"QueueToadlet.siteUploadSucceeded",
new String[] { "link", "/link",
"filename", "size", "files" },
- new String[] { "<a
href=\"/"+uri.toACIIString()+"\">", "</a>", name, SizeUtil.formatSize(size),
Integer.toString(files) } );
+ new String[] { "<a
href=\"/"+uri.toASCIIString()+"\">", "</a>", name, SizeUtil.formatSize(size),
Integer.toString(files) } );
UserAlert alert =
new SimpleHTMLUserAlert(true, title, title, text,
UserAlert.MINOR) {
@Override
Modified: trunk/freenet/src/freenet/keys/FreenetURI.java
===================================================================
--- trunk/freenet/src/freenet/keys/FreenetURI.java 2008-12-22 03:05:32 UTC
(rev 24719)
+++ trunk/freenet/src/freenet/keys/FreenetURI.java 2008-12-22 03:06:08 UTC
(rev 24720)
@@ -548,8 +548,14 @@
return toStringCache;
}
- // FIXME: remove the typo in the function name.
- public String toACIIString() {
+ /**
+ * @deprecated Use {...@link #toASCIIString()} instead
+ */
+ public String toACIIString() {
+ return toASCIIString();
+ }
+
+ public String toASCIIString() {
return toString(true, true);
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs