Closed
Bug 478176
Opened 16 years ago
Closed 16 years ago
multipart/signed does not generate JS emitter events for its immediate payload child
Categories
(MailNews Core :: MIME, defect)
MailNews Core
MIME
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b2
People
(Reporter: asuth, Assigned: asuth)
References
Details
Attachments
(1 file)
1.86 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
Because multipart/signed (MimeMultipartSigned) defers processing of its payload child, the super-class antics of multipart/* (MimeMultipart) never generate the events that the JS emitter (added in bug 447842) is expecting. However, when the payload child is eventually processed, if it has any children, the JS emitter event chain does happen.
Example. Actual MIME structure:
1 multipart/mixed
1.1 multipart/signed
1.1.1 multipart/alternative
1.1.1.1 text/plain
1.1.1.2 text/html
1.1.2 application/x-pkcs7-signature
1.2 text/plain
MIME structure perceived by JS emitter
1 multipart/mixed
1.1 multipart/signed
g-g-ghost!
1.1.1.1 text/plain
1.1.1.2 text/html
(signature also not seen, but no one cares)
1.2 text/plain
The JS emitter is afraid of ghosts and freaks out when it hears about the text/plain.
The provided patch causes the expected series of events to be generated for 1.1.1.
(Note, this blocks 465113, which is itself a blocker.)
Flags: blocking-thunderbird3?
Attachment #361953 -
Flags: superreview?(bienvenu)
Attachment #361953 -
Flags: review?(bienvenu)
Updated•16 years ago
|
Attachment #361953 -
Flags: superreview?(bienvenu)
Attachment #361953 -
Flags: superreview+
Attachment #361953 -
Flags: review?(bienvenu)
Attachment #361953 -
Flags: review+
Comment 1•16 years ago
|
||
Comment on attachment 361953 [details] [diff] [review]
v1 emit jsemitter events for the payload child of multipart/signed parts
I've managed to get this code to trigger from gloda, and nothing bad seems to happen.
If you wanted to, you could tighten this up a little -
+ if (ct) {
+ mimeEmitterAddHeaderField(obj->options, HEADER_CONTENT_TYPE, ct);
+ PR_Free(ct);
+ }
+ else {
+ // no content type means text/plain
+ mimeEmitterAddHeaderField(obj->options, HEADER_CONTENT_TYPE,
+ "text/plain");
+ }
could simply be:
+ mimeEmitterAddHeaderField(obj->options, HEADER_CONTENT_TYPE, ct ? ct : "text/plain");
+ PR_Free(ct);
because PR_Free(null) is harmless.
Assignee | ||
Comment 2•16 years ago
|
||
tightened up and pushed: http://hg.mozilla.org/comm-central/rev/e94f4c8a4a63
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Flags: blocking-thunderbird3?
You need to log in
before you can comment on or make changes to this bug.
Description
•