static long internal_secs, internal_msecs;
#endif
+/* See the comment in gethttp() why this is needed. */
+int global_download_count;
+
void logflush PARAMS ((void));
/* From http.c. */
assert (u->proto != URLFILE); /* #### Implement me! */
mynewloc = NULL;
+ if (u->proto == URLHTTP
#ifdef HAVE_SSL
- if (u->proto == URLHTTP || u->proto == URLHTTPS )
-#else
- if (u->proto == URLHTTP)
-#endif /* HAVE_SSL */
+ || u->proto == URLHTTPS
+#endif
+ )
result = http_loop (u, &mynewloc, dt);
else if (u->proto == URLFTP)
{
redirects, but a ton of boneheaded webservers and CGIs out
there break the rules and use relative URLs, and popular
browsers are lenient about this, so wget should be too. */
- construced_newloc = url_concat (url, mynewloc);
+ construced_newloc = uri_merge (url, mynewloc);
xfree (mynewloc);
mynewloc = construced_newloc;
goto redirected;
}
+ if (u->local)
+ {
+ if (*dt & RETROKF)
+ {
+ register_download (url, u->local);
+ if (*dt & TEXTHTML)
+ register_html (url, u->local);
+ }
+ }
+
if (file)
{
if (u->local)
else
xfree (url);
+ ++global_download_count;
+
return result;
}