Hi! I was using quark and notice that the generated "index of" uses
`<br />` line breaks to separate the links. Given that "index of X"is
a list of links, shouldn't it use a unordered list? Is there a reason
why it uses line breaks?
If you consider that this should be the case, i have attached a patch.
If not, I would l love to know why.
Greting!
---
Draco[Metallium]
diff --git a/resp.c b/resp.c
index 7a7d7a2..7f75a08 100644
--- a/resp.c
+++ b/resp.c
@@ -68,6 +68,7 @@ resp_dir(int fd, char *name, struct request *r)
if (dprintf(fd,
"<!DOCTYPE html>\n<html>\n\t<head>"
- "<title>Index of %s</title></head>\n"
- "\t<body>\n\t\t<a href=\"..\">..</a>",
+ "<title>Index of %s</title>"
+ "\n</head>\n\t<body>\n\t<ul>\n\t\t"
+ "<li><a href=\"..\">..</a></li>",
name) < 0) {
s = S_REQUEST_TIMEOUT;
@@ -83,5 +84,6 @@ resp_dir(int fd, char *name, struct request *r)
/* entry line */
- if (dprintf(fd, "<br />\n\t\t<a href=\"%s%s\">%s%s</a>",
+ if (dprintf(fd, "\n\t\t<li>"
+ "<a href=\"%s%s\">%s%s</a></li>",
e[i]->d_name,
(e[i]->d_type == DT_DIR) ? "/" : "",
@@ -94,5 +96,5 @@ resp_dir(int fd, char *name, struct request *r)
/* listing footer */
- if (dprintf(fd, "\n\t</body>\n</html>\n") < 0) {
+ if (dprintf(fd, "\n\t</ul>\n\t</body>\n</html>\n") < 0) {
s = S_REQUEST_TIMEOUT;
goto cleanup;