If I add a custom x-header to the search criteria (first dropdown in the advanced search dialog) and then search for an x-header in the advanced search dialog, it works. If, however, I save that search as a search folder, it fails. Tested with IMAP, both searching the server and not. Tested on latest nightly build.
This is technically a dupe of bug 205501.
we may be able to use the work in bug 356860 to add the headers required for custom views to "mailnews.customDBHeaders", but we'd also need to change the local db search code to know how to find the custom headers from the msg hdr (basically, call getStringProperty with the lower case version of the header name)
I'm going to address some of the issues from bug 184490 here.
Created attachment 529213 [details] [diff] [review] Always add mailnews.customHeaders to db I have mixed feelings about this patch. I am really trying to address the complaints in bug 184490, but using this current bug as a partial solution. The downsides of this patch are: 1) It only affects messages that are downloaded after a custom header is added, 2) The size of the message db for every message is increased, as any custom header that is defined will now be added to the database for all folders. 3) It makes a lot of search code for custom headers used only rarely, as the custom headers will get added to the database. But it largely solves the problem. AFAICT the problem only occurs for folders that do not have offline storage enabled, hence the disabling of offline storage in the test. What do you think?
I'm probably OK with this because it only affects users who define filters that use custom headers...
Comment on attachment 529213 [details] [diff] [review] Always add mailnews.customHeaders to db copyright on test wants to be 2011, I believe. double ; here nsCString customHeaders;; don't need LL macros here: + if (LL_IS_ZERO(m_receivedTime))
rkent, are you game to finish this?
Sorry, somehow this fell off of my radar screen. I suppose I should fix the nits and ask for a re-review, since it has been over a year.
Created attachment 672361 [details] [diff] [review] Unbitrotted and modernized patch I took the previous patch (which had r+ from bienvenu, but never got landed), and brought it up to date. But since it has been over a year, I figure I should get it re-reviewed. Feel free Irving to just say land it with the existing review.
Comment on attachment 672361 [details] [diff] [review] Unbitrotted and modernized patch Review of attachment 672361 [details] [diff] [review]: ----------------------------------------------------------------- r=bienvenu,irving with the nits fixed. ::: mailnews/imap/test/unit/test_imapSearch.js @@ +6,5 @@ > + * Derived from a combination of test_imapPump.js and test_search.js > + * Original author: Kent James <firstname.lastname@example.org> > + */ > + > +// async support Trailing space @@ +249,5 @@ > + gIMAPMailbox.uidnext++, )); > + gIMAPInbox.updateFolderWithListener(null, asyncUrlListener); > + yield false; > + > + do_check_eq(1, gIMAPInbox.getTotalMessages(false)); Trailing space