diff options
Diffstat (limited to '')
-rw-r--r-- | src/reqs.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -221,7 +221,10 @@ static int extract_http_url (const char *url, struct request_s *request) /* Remove any surrounding '[' and ']' from IPv6 literals */ p = strrchr (request->host, ']'); if (p && (*(request->host) == '[')) { - request->host++; + memmove(request->host, request->host + 1, + strlen(request->host) - 2); + *p = '\0'; + p--; *p = '\0'; } |