aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-18 13:51:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-18 13:51:00 +0000
commit45bd009bb19b7c0aee253995f54c8b54abb48265 (patch)
treec687d57b84569e8431415130009de18dd2000b89 /lib/transfer.c
parentee656415c43cc1b3a7a42442acd04954886ad6eb (diff)
if we found no string on the Location: line, don't try to follow it
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 198864c30..5dcf3f28e 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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 */
+ }
}
/*