Closed
Bug 496046
Opened 16 years ago
Closed 16 years ago
Message headers are processed in reverse order
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aw.moz01, Assigned: neil)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(1 file)
1.41 KB,
patch
|
standard8
:
review+
standard8
:
superreview+
|
Details | Diff | Splinter Review |
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090602 Shredder/3.0b3pre
The headers are processed in the reverse order that they appear in the message (last to first). This looks like it may be caused by the patch in bug 474759 which changed the header field enumerator (nsMimeStringEnumerator::GetNext in nsMimeHtmlEmitter.cpp) to pick off the fields from the end of the array rather than the beginning. I find this problem first appears somewhere between the 20090120 and 20090124 nightlies, which is when that patch was checked in.
This bug causes two different problems, depending on the header display mode:
A. Normal Headers mode
If a particular header appears more than once in a message, the one that appears last will be displayed, instead of the one that appears first.
Steps to Reproduce:
1. Set the mailnews.headers.extraExpandedHeaders pref to include a header that appears more than once in a particular message
2. Exit and restart shredder (necessary to pick up the changed pref)
3. Display the message selected above
4. Display expanded headers for the message
Actual Results:
Last-appearing header matching the extraExpandedHeaders pref is displayed.
Expected Results:
First-appearing header should be displayed.
B. View All Headers mode
All headers are displayed in reverse order.
Steps to Reproduce:
1. Select View All Headers mode
2. Display a message
3. Select View Message Source
Actual Results:
Headers in message window are in reverse order from those in the source window.
Expected Results:
Headers should be in the same order.
Assignee | ||
Comment 1•16 years ago
|
||
I decided to spend 4 bytes on not shifting elements in the array.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #381362 -
Flags: superreview?(bugzilla)
Attachment #381362 -
Flags: review?(bugzilla)
Comment 2•16 years ago
|
||
Should the patch add some documentation somewhere to define what our behavior is? When reading this bug, I thought it's not entirely clear why we should traverse in one direction over the other. Or if not documentation, a unit test?
Updated•16 years ago
|
Attachment #381362 -
Flags: superreview?(bugzilla)
Attachment #381362 -
Flags: superreview+
Attachment #381362 -
Flags: review?(bugzilla)
Attachment #381362 -
Flags: review+
Comment 3•16 years ago
|
||
Comment on attachment 381362 [details] [diff] [review]
Proposed patch
r/sr=Standard8 as long as you add documentation as to why we should process them in a specific order.
A unit test would also be nice.
Assignee | ||
Comment 4•16 years ago
|
||
Pushed changeset 7075e80889c6 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 5•16 years ago
|
||
Neil, can this bug explain phenomenon of bug 435286 Comment #1?
Will problem of bug 435286 be fixed by fix of this bug?
Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5)
> Neil, can this bug explain phenomenon of bug 435286 Comment #1?
> Will problem of bug 435286 be fixed by fix of this bug?
I doubt it, but I'll CC someone who might know to that bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•