mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-17 06:54:42 +03:00
[project @ 2005-04-09 10:00:00 by bursa]
Serialize fetches with no host (should fix multiple local files not loading in certain cases). svn path=/import/netsurf/; revision=1611
This commit is contained in:
parent
20c4d5d114
commit
c4d3ac1d8f
@ -241,6 +241,10 @@ struct fetch * fetch_start(char *url, char *referer,
|
||||
/* we only fail memory exhaustion */
|
||||
if (res == URL_FUNC_NOMEM)
|
||||
goto failed;
|
||||
if (!host)
|
||||
host = strdup("");
|
||||
if (!host)
|
||||
goto failed;
|
||||
|
||||
res = url_scheme(url, &ref1);
|
||||
/* we only fail memory exhaustion */
|
||||
@ -323,25 +327,22 @@ struct fetch * fetch_start(char *url, char *referer,
|
||||
}
|
||||
|
||||
/* look for a fetch from the same host */
|
||||
if (host) {
|
||||
for (host_fetch = fetch_list;
|
||||
host_fetch && (host_fetch->host == 0 ||
|
||||
strcasecmp(host_fetch->host, host) != 0);
|
||||
host_fetch = host_fetch->next)
|
||||
for (host_fetch = fetch_list;
|
||||
host_fetch && strcasecmp(host_fetch->host, host) != 0;
|
||||
host_fetch = host_fetch->next)
|
||||
;
|
||||
if (host_fetch) {
|
||||
/* fetch from this host in progress:
|
||||
queue the new fetch */
|
||||
LOG(("queueing"));
|
||||
fetch->curl_handle = 0;
|
||||
/* queue at end */
|
||||
for (; host_fetch->queue_next;
|
||||
host_fetch = host_fetch->queue_next)
|
||||
;
|
||||
if (host_fetch) {
|
||||
/* fetch from this host in progress:
|
||||
queue the new fetch */
|
||||
LOG(("queueing"));
|
||||
fetch->curl_handle = 0;
|
||||
/* queue at end */
|
||||
for (; host_fetch->queue_next;
|
||||
host_fetch = host_fetch->queue_next)
|
||||
;
|
||||
fetch->queue_prev = host_fetch;
|
||||
host_fetch->queue_next = fetch;
|
||||
return fetch;
|
||||
}
|
||||
fetch->queue_prev = host_fetch;
|
||||
host_fetch->queue_next = fetch;
|
||||
return fetch;
|
||||
}
|
||||
|
||||
/* create the curl easy handle */
|
||||
|
Loading…
x
Reference in New Issue
Block a user