Skip to content
Snippets Groups Projects
Commit 45bd009b authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

if we found no string on the Location: line, don't try to follow it

parent ee656415
No related branches found
No related tags found
No related merge requests found
......@@ -660,9 +660,11 @@ CURLcode Curl_readwrite(struct connectdata *conn,
while(*ptr && !isspace((int)*ptr))
ptr++;
backup = *ptr; /* store the ending letter */
*ptr = '\0'; /* zero terminate */
conn->newurl = strdup(start); /* clone string */
*ptr = backup; /* restore ending letter */
if(ptr != start) {
*ptr = '\0'; /* zero terminate */
conn->newurl = strdup(start); /* clone string */
*ptr = backup; /* restore ending letter */
}
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment