totoroliu got a fish trophy!
Fix for ticket-4438: Email header is too large when too many changed files
Review Request #8558 — Created Nov. 30, 2016 and discarded
Fix for ticket-4438: Email header is too large when too many changed files
N/A
-
Hi Rick,
Thanks for the contribution! However, this is a feature people do depend on, so we can't simply shut it off.
I know we have some issues with mail header lengths, so I think the right way to address this is to keep a running count on the length as we add the files to the header, making sure we don't exceed the header length (and we need to factor in UTF-8 encodings for the file list values here).
I also considered a maximum number of files to cap, but since each file is allowed technically to be 1024 characters in length, we'd only be able to fit under 32 files in the list. This might not be enough. So I think looping is the best option. In the majority of cases, we'll be able to fit the entire file list. In these kinds of corner cases with hundreds of files (which is generally not reviewable by a person anyway), we'll simply not list all the files, and those depending exclusively on this header to sort will find their e-mail in the Inbox instead of the desired folder.