mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Add slash to href for directories (#17)
This allows client side parsers to decide when a link is a directory. This is needed for example in the rclone http backend. https://rclone.org/http/
This commit is contained in:
parent
3641c2f50f
commit
a981031e6f
@ -1987,6 +1987,8 @@ static void generate_dir_listing(struct connection *conn, const char *path,
|
|||||||
|
|
||||||
append(listing, "<a href=\"");
|
append(listing, "<a href=\"");
|
||||||
append(listing, safe_url);
|
append(listing, safe_url);
|
||||||
|
if (list[i]->is_dir)
|
||||||
|
append(listing, "/");
|
||||||
append(listing, "\">");
|
append(listing, "\">");
|
||||||
append_escaped(listing, list[i]->name);
|
append_escaped(listing, list[i]->name);
|
||||||
append(listing, "</a>");
|
append(listing, "</a>");
|
||||||
|
Loading…
Reference in New Issue
Block a user