Commit Diff


commit - 93edd35305508c984cbee45594dfa45808373a61
commit + a81dd6cda6c823fd9ab43abbf8722ced47a754a8
blob - 8a2ab7b8597aa36bb6caf94988dc5f10e1dd9734
blob + b9ffe259d95a3ed9c1c72620a1371c2f3a9ba271
--- log.c
+++ log.c
@@ -238,7 +238,8 @@ log_request(struct client *c, char *meta, size_t l)
 		else
 			strlcat(b, c->iri.host, sizeof(b));
 
-		strlcat(b, "/", sizeof(b));
+		if (*c->iri.path != '/')
+			strlcat(b, "/", sizeof(b));
 		strlcat(b, c->iri.path, sizeof(b)); /* TODO: sanitize UTF8 */
 		if (*c->iri.query != '\0') {	    /* TODO: sanitize UTF8 */
 			strlcat(b, "?", sizeof(b));