projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee65641
)
if we found no string on the Location: line, don't try to follow it
author
Daniel Stenberg
<daniel@haxx.se>
Fri, 18 Oct 2002 13:51:00 +0000
(13:51 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Fri, 18 Oct 2002 13:51:00 +0000
(13:51 +0000)
lib/transfer.c
patch
|
blob
|
history
diff --git
a/lib/transfer.c
b/lib/transfer.c
index
198864c
..
5dcf3f2
100644
(file)
--- 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 */
+ }
}
/*