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
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -660,10 +660,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
            while(*ptr && !isspace((int)*ptr))
              ptr++;
            backup = *ptr; /* store the ending letter */
            if(ptr != start) {
              *ptr = '\0';   /* zero terminate */
              conn->newurl = strdup(start); /* clone string */
              *ptr = backup; /* restore ending letter */
            }
          }

          /*
           * End of header-checks. Write them to the client.