mirror of https://github.com/omar-polo/gmid.git
fix "double slash" in logs
gmid ended up printing two slashes between the hostname and the path when logging the request IRI.
This commit is contained in:
parent
93edd35305
commit
a81dd6cda6
3
log.c
3
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));
|
||||
|
|
Loading…
Reference in New Issue