Skip to content

Commit

Permalink
Merge pull request NanoHttpd#325 from philippwiesemann/fix-webserver-…
Browse files Browse the repository at this point in the history
…html

Fix webserver directory listing being wrong HTML
  • Loading branch information
LordFokas authored Jun 12, 2016
2 parents 1866496 + 2260799 commit 9467101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webserver/src/main/java/fi/iki/elonen/SimpleWebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ public boolean accept(File dir, String name) {
if (up != null || directories.size() > 0) {
msg.append("<section class=\"directories\">");
if (up != null) {
msg.append("<li><a rel=\"directory\" href=\"").append(up).append("\"><span class=\"dirname\">..</span></a></b></li>");
msg.append("<li><a rel=\"directory\" href=\"").append(up).append("\"><span class=\"dirname\">..</span></a></li>");
}
for (String directory : directories) {
String dir = directory + "/";
msg.append("<li><a rel=\"directory\" href=\"").append(encodeUri(uri + dir)).append("\"><span class=\"dirname\">").append(dir)
.append("</span></a></b></li>");
.append("</span></a></li>");
}
msg.append("</section>");
}
Expand Down

0 comments on commit 9467101

Please sign in to comment.