Jorge wrote:
On Fri, Apr 11, 2008 at 02:33:50PM +0000, corvid wrote:
Jorge wrote:
Please also add a file size threshold, to avoid a dillo exit from an out of memory condition.
Does something like this sound about right?
Yes, but I'd add a WEB_RootUrl check:
+ if (entry->Flags & CA_HugeFile) { + AbortEntry = TRUE; + a_UIcmd_set_msg(Client_bw,"Huge file! (%dMB)", + entry->ExpectedSize / (1024*1024)); ++ if (ClientWeb->flags & WEB_RootUrl && + dStrcasecmp(URL_SCHEME(entry->Url), "file")) + OfferDownload = TRUE; + }
I saw that the current code only did so for root URLs, but I didn't realize it was intentional. BTW, do you think dillo should do anything if it gets a huge file from a server but didn't know to expect the file to be huge ahead of time (no content length, or chunked transfer encoding)?