+ if (p = strchr(url, '/'))
+ {
+ http->path = strdup(p);
+ *p = '\0';
+ http->hostport = strdup(url);
+ }
+ /*
+ * Repair broken HTTP requests that don't contain a path
+ */
+ else
+ {
+ /* Repair hostport & path */
+ http->path = strdup("/");
+ http->hostport = strdup(url);
+
+ /* Even repair cmd in case we're just forwarding. Boy are we nice ;-) */
+ freez(http->cmd);
+ http->cmd = strsav(http->cmd, http->gpc);
+ http->cmd = strsav(http->cmd, " / ");
+ http->cmd = strsav(http->cmd, http->ver);
+ }