This commit is contained in:
2017-06-13 16:48:59 +02:00
parent b1038058cb
commit 74ab4dc51a
@@ -85,7 +85,7 @@ public class AHTreeReader {
if (proxy) if (proxy)
httpPost.setConfig(config); httpPost.setConfig(config);
// parent node is transferred as form data o_0 // XXX parent node is transferred as form data o_0
httpEntity = MultipartEntityBuilder.create().addTextBody("parent", n.key).build(); httpEntity = MultipartEntityBuilder.create().addTextBody("parent", n.key).build();
httpPost.setEntity(httpEntity); httpPost.setEntity(httpEntity);
@@ -135,6 +135,7 @@ public class AHTreeReader {
String content = EntityUtils.toString(response.getEntity()); String content = EntityUtils.toString(response.getEntity());
response.close(); response.close();
// XXX reply is not necessarily well-formed
// simply hack out the second <ul> element: // simply hack out the second <ul> element:
int startIndex = content.indexOf("</ul>"); int startIndex = content.indexOf("</ul>");
String mainCategories = content.substring(content.indexOf("<ul>", startIndex), content.indexOf("</ul>", startIndex + 5) + 5); String mainCategories = content.substring(content.indexOf("<ul>", startIndex), content.indexOf("</ul>", startIndex + 5) + 5);