Permalink
Browse files

Merge remote branch 'operhiem1/rememberDir' into next

  • Loading branch information...
2 parents 69a6521 + 4e0e9d1 commit bb832f77e6f43098a56f04dda2fb734ce237e076 @toad toad committed Jun 24, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/freenet/clients/http/LocalFileBrowserToadlet.java
@@ -23,7 +23,7 @@
*/
public abstract class LocalFileBrowserToadlet extends Toadlet {
protected final NodeClientCore core;
- private static final int maxPOSTSize = 1024*1024;
+ private static final int MAX_POST_SIZE = 1024*1024;
public LocalFileBrowserToadlet (NodeClientCore core, HighLevelSimpleClient highLevelSimpleClient) {
super(highLevelSimpleClient);
@@ -189,7 +189,7 @@ private void createChangeDirButton (HTMLNode node, String buttonText, String pat
private Hashtable<String, String> readPOST (HTTPRequest request) {
Hashtable<String, String> set = new Hashtable<String, String>();
for (String key : request.getParts()) {
- set.put(key, request.getPartAsStringFailsafe(key, maxPOSTSize));
+ set.put(key, request.getPartAsStringFailsafe(key, MAX_POST_SIZE));
}
return set;
}
@@ -217,7 +217,7 @@ private String selectedValue(HTTPRequest request) {
} else if (request.isPartSet(filenameField()) &&
(request.isPartSet(selectDir) || request.isPartSet(selectFile))) {
//Request is a POST.
- return request.getPartAsStringFailsafe(filenameField(), maxPOSTSize);
+ return request.getPartAsStringFailsafe(filenameField(), MAX_POST_SIZE);
}
return null;
}
@@ -241,7 +241,7 @@ public void handleMethodGET (URI uri, HTTPRequest request, final ToadletContext
public void handleMethodPOST (URI uri, HTTPRequest request, final ToadletContext ctx)
throws ToadletContextClosedException, IOException, RedirectException {
- renderPage(persistenceFields(readPOST(request)), request.getPartAsStringFailsafe("path", maxPOSTSize),
+ renderPage(persistenceFields(readPOST(request)), request.getPartAsStringFailsafe("path", MAX_POST_SIZE),
ctx, selectedValue(request));
}

0 comments on commit bb832f7

Please sign in to comment.