diff options
author | Omar Polo <op@omarpolo.com> | 2020-11-18 09:34:42 +0100 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2020-11-18 09:34:42 +0100 |
commit | 7cd6880b84f3bba0cc8b11ef452dba18e0b51155 (patch) | |
tree | bd88990953b9db6db431e522ad605c3f7b08ec52 | |
parent | ae2ad03ec0ae5f2300472239eb48f3e23d467fe2 (diff) |
correctly handle also non absolute URLs
-rw-r--r-- | gmid.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -202,6 +202,10 @@ url_start_of_request(char *url) if ((s = url_after_proto(url)) == NULL) return NULL; + /* non-absolute URL */ + if (s == url) + return s; + if ((t = strstr(s, "/")) == NULL) return s + strlen(s); return t; |