diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-05-18 20:48:40 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-05-18 20:58:03 +0200 |
commit | e8be369aa93f535519d6f63db324571286a8996b (patch) | |
tree | c371d12e411e2f27942b117ce8ca2e921ceae02e | |
parent | b47de46fa4189c8fa890851c1e63d57c6b7d1d9a (diff) |
Only parse Content-Disposition for root URLs
A server may return the Content-Disposition in elements of a page like
images, which would otherwise trigger several "save as" dialogs.
Fixes: https://github.com/dillo-browser/dillo/issues/398
-rw-r--r-- | src/cache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cache.c b/src/cache.c index 28efda71..862d199a 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1213,9 +1213,6 @@ static CacheEntry_t *Cache_process_queue(CacheEntry_t *entry) } else return entry; /* i.e., wait for more data */ } - if (entry->ContentDisposition) { - a_Misc_parse_content_disposition(entry->ContentDisposition, &dtype, &dfilename); - } Busy = TRUE; for (i = 0; (Client = dList_nth_data(ClientQueue, i)); ++i) { @@ -1224,6 +1221,11 @@ static CacheEntry_t *Cache_process_queue(CacheEntry_t *entry) Client_bw = ClientWeb->bw; /* 'bw' in a local var */ if (ClientWeb->flags & WEB_RootUrl) { + /* Only parse Content-Disposition on root URLs */ + if (entry->ContentDisposition) { + a_Misc_parse_content_disposition(entry->ContentDisposition, + &dtype, &dfilename); + } if (!(entry->Flags & CA_MsgErased)) { /* clear the "expecting for reply..." message */ a_UIcmd_set_msg(Client_bw, ""); |