Follow-up Comment #4, bug #60494 (project wget):
Here's one proposed change (see patch below). It likely is not comprehensive
enough.
The broader issue seems to be that there are circumstances in *./src/retr.c*
when *retrieve_url()* calls *url_parse()*, which already was called in
*./src/main.c*. This can result in the *file* property in *struct url* being
modified in-place more than once (triggering errors as the one originally
reported in this issue).
For now, I'm going to defer making these changes (including suggested patch
below) to those more familiar with the *wget* repo than I.
diff --git a/src/http.c b/src/http.c
index d25762fa..a9fa237f 100644
--- a/src/http.c
+++ b/src/http.c
@@ -4280,8 +4280,10 @@ http_loop (const struct url *u, struct url
*original_url, char **newloc,
}
else if (!opt.content_disposition)
{
- hstat.local_file =
- url_file_name (opt.trustservernames ? u : original_url, NULL);
+ if (opt.trustservernames)
+ hstat.local_file = url_file_name (u, NULL);
+ else
+ hstat.local_file = original_url->file;
got_name = true;
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60494>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/