mirror of
https://github.com/curl/curl.git
synced 2026-05-05 00:29:56 +03:00
if we found no string on the Location: line, don't try to follow it
This commit is contained in:
parent
ee656415c4
commit
45bd009bb1
1 changed files with 5 additions and 3 deletions
|
|
@ -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 */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue