Navigation Menu

Skip to content

Commit

Permalink
Merge remote branch 'operhiem1/rememberDir' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
toad committed Jun 24, 2012
2 parents 69a6521 + 4e0e9d1 commit bb832f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/freenet/clients/http/LocalFileBrowserToadlet.java
Expand Up @@ -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);
Expand Down Expand Up @@ -189,7 +189,7 @@ private Hashtable<String, String> readGET (HTTPRequest request) {
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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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));
}

Expand Down

0 comments on commit bb832f7

Please sign in to comment.