[MIME] "This body part will be downloaded on demand" strikes back

RESOLVED FIXED in Thunderbird 3.1b1

Status

RESOLVED FIXED
15 years ago
9 years ago

People

(Reporter: om_bugzilla.mozilla.org-046, Assigned: philbaseless-firefox)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 3.1b1
x86
All
Dependency tree / graph
Bug Flags:
blocking-thunderbird3 -
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 4 obsolete attachments)

(Reporter)

Description

15 years ago
User-Agent:       Opera/6.12 (OpenBSD 3.4; U)  [en]
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514

Exact same symptoms (and probably, cause) as
http://bugzilla.mozilla.org/show_bug.cgi?id=190905
except that I've experienced this issue with Mozilla 1.7rc2
(Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514)

[Sorry, I whish I could just have re-opened #190905]

The message was in text/rtf with 3 attachments, the last one being plain txt.
I'll try and attach the source as moz1.7rc2_bug190905.txt (whole message but
with private data removed)

Funny fact: the fix previously submitted for #190905 actually seems to be the
cause of the problem this time.
The email is displayed fine only if "View > Message Body As > Plain text" is
selected.


Reproducible: Always
Steps to Reproduce:
Same as http://bugzilla.mozilla.org/show_bug.cgi?id=190905
(Reporter)

Comment 1

15 years ago
Created attachment 150571 [details]
Message causing the problem on Mozilla 1.7rc2

Comment 2

15 years ago
I have the same problem with Mozilla 1.5 US version. 
We use Imap connection.
--> The only solution I found is to select the message and "copy to" a Local
folder. Or simply move it on a local folder. Then you can see the full body of
the message instead of the "This body part will be downloaded on demand" message.

But it is still anoying users to get these type of message and not be able to
see them in there inbox.

Keep up the good work !!

PS: I wonder if this bug has anything to do with the mail client that is used to
renerate the email that has this message in it. For my experience, It tends that
 these message comes from MS Outlook mail clients...

Dubweb 

Comment 3

14 years ago
Mozilla 1.7.3
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

"me too" 

Occurs (inappropriately, in my opinion) in this situation:
View/Message Body As/Original HTML
View/Display Attachments Inline (NOT selected)
  
First section of msg:
This is a multi-part message in MIME format.

------_=_NextPart_001_01C49F54.FE8DED80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Second section of msg: 
------_=_NextPart_001_01C49F54.FE8DED80
Content-Type: text/html;
	name="HP Software News.htm"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="HP Software News.htm"

First section of message has actual text included.

I think the message "This body part will be downloaded on demand" is
inappropriate because it does not describe the situtaion.

(Workaround: Select View/Attachement Display Inline)
 

Comment 4

14 years ago
Confirming based on multiple reports here and the probable dupe from TB at 
bug 265022.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 5

14 years ago
*** Bug 265022 has been marked as a duplicate of this bug. ***

Comment 6

14 years ago
(Duplicate is not about TB, but Moz 1.7.2 -- the bug was misfiled.)

Comment 7

14 years ago
I get this message when a co-worker (both of us using Thunderbird 0.7) who has
HTML composing off and a vcard attached, sends a message with other attachments.
 If I "view message body as plain text", it goes away and shows the correct MIME
body text.  I had her switch to a plaintext signature instead of the vcard, and
the problem went away.

I will install the latest Mozilla suite and read the problematic messages with
it, to see if the bug is there.

Comment 8

14 years ago
I wonder if this could be a configuration issue.

Last week I copied a raw message with the known symptoms from one of our users
to my own mail folder on the server side and we both have the same Mozilla
version. He gets this error message I and I don't. We're both running 1.7.3
although previously he used 1.6 which I haven't used in a while.

I'll try and get a hold of the mail in question again and compare our .js files.

Server: MDaemon 7.2.1, client: Mozilla 1.7.3 on Windows 2000.

Comment 9

14 years ago
Just for completeness here are the mail headers of the mail from last week
(sorry, I xx-ed out some headers for privacy reasons).

Note that in contrast to other reports this was NOT an Outlook sender. The mail
body goes on further (it's quite long).

-


Return-path: <Xxx.Xxxxx@cropdesign.com>
Received: from xxxx.cropdesign.local ([10.1.1.11])
	by cropdesign.com (cropdesign.com)
	(MDaemon.PRO.v7.2.0.R)
	with ESMTP id md50000019790.msg
	for <yyyyyy@cropdesign.com>; Mon, 08 Nov 2004 01:11:11 +0100
Received: (from xxxxxxxx@localhost)
	by xxxx.cropdesign.local (8.11.6/8.11.6/SuSE Linux 0.5) id iA80B7217052;
	Mon, 8 Nov 2004 01:11:07 +0100
Date: Mon, 8 Nov 2004 01:11:07 +0100
X-Authentication-Warning: xxxx.cropdesign.local: xxxxxxxx set sender to Xxx
Xxxxx <Xxx.Xxxxx@cropdesign.com> using -f
To: Yyyyyyyyy Yyyyyyy <yyyyyyyyyy.yyyyyyy@cropdesign.com>,
   Xxx Xxxxx <Xxx.Xxxxx@cropdesign.com>,
Subject: Diffxxxxxxx
MIME-Version: 1.0
From: Xxx Xxxxx <Xxx.Xxxxx@cropdesign.com>
X-Mailer: HTML Mime mail class (http://www.phpguru.org)
Content-Type: multipart/alternative;
	boundary="=_d944546a2735ed5c2d20baef1aeb3cf3"
Message-ID: <i6u36j.j2fxpp@>
X-Spam-Processed: cropdesign.com, Mon, 08 Nov 2004 01:11:11 +0100
	(not processed: message from valid local sender)
X-MDRcpt-To: yyyyyyyyyy.yyyyyyy@cropdesign.com
X-Rcpt-To: yyyyyyyyyy.yyyyyyy@cropdesign.com
X-MDRemoteIP: 10.1.1.11
X-Return-Path: Xxx.Xxxxx@cropdesign.com
X-MDaemon-Deliver-To: yyyyyy@cropdesign.com
Reply-To: Xxx.Xxxxx@cropdesign.com

--=_d944546a2735ed5c2d20baef1aeb3cf3
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit


--=_d944546a2735ed5c2d20baef1aeb3cf3
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

<table border=3D1><tr><th>XxxXx / XXxx</th><th>xxxxxxxxxx</th><th>XXX</th><=
th>xxxxxxxx</th><th>XXX</th></tr>

Comment 10

14 years ago
do you have view | display attachments inline checked? If that's not checked,
you can run into this problem with some messages...
Product: MailNews → Core

Comment 11

14 years ago
As proposed before, 

set the view options to "view message body as plain text or simple HTML"

Hopefully this resolves the bug.

Martin 

Comment 12

14 years ago
I have the same problem in Mozilla Thunderbird 1.0.2 (20050317) with Windows XP.
Is it fixed in Thunderbird 1.0.6 ?

Thanks!
I got a report that this error appeared in deerpark thunderbird (have to check
the detailed version). And "display attachments inline" is activated there.
Any logging which can be enabled to find out what happens?

Comment 14

13 years ago
I get report in AviaryPL bugzilla system telling that this problem occur on Thunderbird pre-1.5 and after few hours of testing on Thunderbird 1.5 RC2 test build I'm able to fabricate message that will cause described problem. I can tell you this is not about headers. I've send two messages with identical body and text attachment, but in one message attachment was Windows-1250 encoded, and in other it was in UTF-8. Message with UTF-8 text file shows "This body part will be downloaded on demand" instead of body. The other one displays just fine. 

They both had the same headers (except of times, ID numbers and boundary numbers , which of course must differ) for body (sorry for those xxx's): 
From: Piotr Komoda <xxxxxxx@xxxxxx.pl>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To:  xxxxxxx@xxx.pl
Subject: Test IMAP 6
Content-Type: multipart/mixed;
 boundary="------------060103020005000405080707"
X-AntiVirus: pre-scanned (content of archives NOT checked)

This is a multi-part message in MIME format.
--------------060103020005000405080707
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit

And for attachment:
Content-Type: text/plain;
 name="2005-10-02-log.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="2005-10-02-log.txt"

So now we just have to look on what characters are making problems with mail.server.default.mime_parts_on_demand set to true. When this option is set to false, message displays alright. And yes, mail.imap.mime_parts_on_demand has nothing to do with this.

Comment 15

13 years ago
flagging for investigation on the trunk.
Target Milestone: --- → mozilla1.9beta

Comment 16

13 years ago
I see this with TB 1.5 and it is rather frustrating. The work-arounds (switching the view to text or viewing message source) work but re-download the message via IMAP, which takes time and wastes my ADSL bandwidth.

It seems this happens often when somebody using Outlook and/or sending via an Exchange server sends an email with attachments in addition to a body. For example, just now I got one with the body and first attachment in text/plain and a second attachment text/xml. Below are some snippets from the message source window.

Joachim

X-MIMEOLE: Produced By Microsoft Exchange V6.0.6603.0
Content-type: multipart/mixed; boundary="Boundary_(ID_F/1M8LasFJSyVvaJjFQzyA)"

--Boundary_(ID_F/1M8LasFJSyVvaJjFQzyA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT

...

--Boundary_(ID_F/1M8LasFJSyVvaJjFQzyA)
Content-type: text/plain; name=FILENAME.TXT
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=FILENAME.TXT
Content-description: FILENAME.TXT

...

--Boundary_(ID_F/1M8LasFJSyVvaJjFQzyA)
Content-type: text/xml; name=file.xml
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=file.xml
Content-description: file.xml

...

--Boundary_(ID_F/1M8LasFJSyVvaJjFQzyA)--

Comment 17

13 years ago
is this the same as bug 321495 ? If so, it should be fixed in recent trunk builds.

Comment 18

13 years ago
(In reply to comment #17 [David Bienvenu])
> is this the same as bug 321495 ? If so, it should be fixed in recent trunk
> builds.

"This" meaning this bug, or the problem in comment 14 et seq?  Either way, I don't see the resemblance.

Comment 14, however, does mention for the first time in this bug the preference
  mail.server.server_X_.mime_parts_on_demand
which is described at bug 149771 comment 11 as a workaround.  The original report of this bug may be a dupe of that one.

Comment 19

12 years ago
Bug is still present in TB 1.5.0.5 - i saw it today when trying to open an eMail in the "Sent" folder that consisted of 18 lines of message text, and two attachments: one 105kb .csv (comma-seperated-values) file and a 62kb .doc (microsoft word) file.

"View/Display Attachments Inline" made the message text appear, even though the message text itself was not an attachment and IMHO not even html.

Comment 20

12 years ago
This bug is active in TB 2.0 Beta 2 and the behavior appears to have changed a bit from what others described. Specifically, selecting "display attachments inline" has no effect no matter its setting (on or off). I received a multipart/mixed MIME message and the first part (the text of the email) is a text file (below). The message initially displayed properly, but as soon as I downloaded one of the 6 attachments, I only see "This body part will be downloaded on demand." Now it won't go back to displaying the text email regardless of whether I close and reopen the program. Squirrelmail, my webmail client, has no problems displaying this message or downloading its attachments.

--=__PartFCD87876.0__=
X-Mozilla-IMAP-Part: 1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

This body part will be downloaded on demand.

Comment 21

12 years ago
I'm hitting this bug as well using Tbird 2.0.0.4.  Most of the instances I've hit are messages coming from AOL or Yahoo Mail.  I've got at least one example of a message that triggers the bug.

Comment 22

11 years ago
i'm too hitting this bug with one message. at first, i could save the attachments but now it is not working and i see no possibility to re-download the message.

Comment 23

11 years ago
ok, rebuilding the index solves this problem for me:

1) right click on the parent folder of the corrupted message
2) choose properties
3) choose "rebuild index"
4) wait for complete
5) done

Comment 24

11 years ago
(In reply to comment #23)
> 3) choose "rebuild index"

No such option here on Thunderbird version 1.5.0.12 (20070604) on ubuntu.
OS: Windows 2000 → All

Comment 25

11 years ago
Moving the msg to another folder solves the problem for me.

Comment 26

11 years ago
This bug is still present in version 2.0.0.6 (20070728).

Will attach a mail that causes the error.

Comment 27

11 years ago
Created attachment 282087 [details]
email that causes the "This body part will be downloaded on demand." error message with IMAP.

Comment 28

11 years ago
btw: Using the rebuild index option didnt fix the problem.
Product: Core → MailNews Core

Updated

10 years ago
QA Contact: grylchan → networking.imap

Comment 29

10 years ago
I see "This body part will be downloaded on demand" when I reply to some e-mails. It's the quoted part, instead of the text I'm replying to. Very confusing message, and frustrating to not have the quoted e-mail text.
Next phenomenon itself is very easily observed;
  "This body part will be downloaded on demand" is displayed as HTML mail body
  even though mail data in offline-store is healthy.
by interfere of external program(file open of offline-store by external program.)

(1) Restart Tb, download all mail data in offline-store.
    Mail is displayed normally.
(2) Restart Tb(disable automatic check at startup, every NNN minutes for testing)
(3) Open(read open) offline-store file by external program.
(4) Open mail folder, view mail => "This body part will be downloaded on demand"
(5-A) If external program closes offline-store file
    before Tb detects error and considers it corruption of something,
    data in offline-store is normally read by Tb upon next click of the mail. 
(5-B) If external program keeps open of offline-store file for long time,
    and if Tb detects error and considers it corruption of something,
    (example. Compact Folders is invoked and fails due to interfere by others)
    "This body part will be downloaded on demand" is displayed,
    until external program closes offline-store and mail data is re-downloaded,
    by next auto-sych scheduling or by manual rebuild-index or by internal
    rebuild-index due something wrong.

Big mbox and big offline-store file?
External program such as auto-back up is used?
(In reply to comment #20)
> --=__PartFCD87876.0__=
> X-Mozilla-IMAP-Part: 1
> Content-Type: text/plain; charset=US-ASCII
>(snip)
> 
> This body part will be downloaded on demand.

"Partial data in offline-store" case is processed by Bug 468637.
Michael Hallquist, watch Bug 468637 if offline-use=on case, please.
Phenomenon itself is very easily observed by next too.
  Delete offline-store file.
It can occur if "Compact Folders" is interfered by external program such as auto-backup. See Bug 498814 Comment #4 for it.
Another case is found:
[ Step (8) of Bug 468637 Comment #10 with HTML test mail attached to Bug 501253 ]
  New mail arrives, and message headers are fetched.
  Before whole mail data is downloaded into offline-store, click mail.
    => "This body part will be downloaded on demand." is displayed.
  After a while, whole mail data is downloaded into offline-store by auto-sync.
    => "This body part will be downloaded on demand." is still displayed.
  Click other mail, and click the mail again.
    => Mail is properly displayed.
No longer blocks: 468595
Depends on: 468595
To all problem reporters except bug opener:

What is your base or evidence that your case is same problem as original problem of this bug(comment #0)? Please note that "This body part will be downloaded on demand" itslef can be seen in some(not so small number) situations. Mixture of many different cases in a bug makes problem analysis impossible, and it'll wont produce solution. Please note that not all crash problem is same problem, even if "Tb crashes" is absolutely same.

To bug opener and all problem reporters:

"Partial data in offline-store" case was processed by Bug 468595. And Bug 468595 is already fixed. (See Bug 468595 Comment #55 for checkin id)
See also bugs listed in dependency tree for Bug 468595, please.

Can you reproduce original problem of this bug (comment #0) with newest nightly build, using two attached mails to this bug?
Can you reproduce your problem with newest nightly build?

>(Next Thunderbird 3.0)
> http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-1.9.1/
> http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-1.9.1-l10n/
>(Next SeaMonkey 2.0)
> http://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-comm-1.9.1/
> http://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-comm-1.9.1-l10n/
>(SeaMonkey trunk, with Gecko 1.9.3)
> http://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-comm-central-trunk/
> If MS Win, download win32.zip build. You can test by UNZIP only.

Note:
As I wrote in Bug 501253 Comment #21 to 23, and as I wrote in some previous comments, "This body part will be downloaded on demand" itself can be observed in
special situation.

Comment 35

9 years ago
I have experienced this in 3.0 rc1 (as well as repeatedly in 2.0)

As a normal user, this bug is very annoying! 
As an IT Manager it stops me recommending TB to my user base.

I would love to see it listed as a blocker.

I can help in debugging if given instructions.

Updated

9 years ago
Flags: blocking-thunderbird3?
(In reply to comment #35)
> I would love to see it listed as a blocker.

With no steps to repeat and only very occasional reports of this we're not going to hold the significant upgrade of Thunderbird 3 from users. We'll consider a patch for a security & stability update if a solution can be found.

> I can help in debugging if given instructions.

Wada or David Bienvenu should be able to give you more instructions.
Flags: blocking-thunderbird3? → blocking-thunderbird3-
(Assignee)

Comment 37

9 years ago
http://mxr.mozilla.org/comm-central/source/mailnews/imap/src/nsIMAPBodyShell.cpp#747

the strlen of the text/html part, which is part "1", is not >= 2 so it is not fetched.
(In reply to comment #37)
> the strlen of the text/html part, which is part "1", (snip)

As seen in Bug 532779, Mozilla uses part=1.2 for second part in multipart/mixed.
(Assignee)

Comment 39

9 years ago
In the second attached email this is the bodystructure the way Mozilla sees it:

Part 0          MIME-Version: 1.0
                Content-Type: multipart/related; boundary="=_a7feaa8c5fdfa8743acc7cadc190adf0"
                
Part 1          --=_a7feaa8c5fdfa8743acc7cadc190adf0
                Content-Type: text/html; charset="UTF-8"
                Content-Transfer-Encoding: quoted-printable
                
                
Part 2          --=_a7feaa8c5fdfa8743acc7cadc190adf0
                Content-Type: image/jpeg
                Content-Transfer-Encoding: base64
                Content-Disposition: inline; filename="Club-philips-logo_69x55.jpg"
                Content-ID: <8aa65aaf56c805fc71ef7c76fb22614b>
                
Part 3          --=_a7feaa8c5fdfa8743acc7cadc190adf0
                Content-Type: image/jpeg
                Content-Transfer-Encoding: base64
                Content-Disposition: inline; filename="clubphilips_nologo_560x100.jpg"
                Content-ID: <eda5d27e7e5fbc15d6fb48c5d6163fdd>
                
                
Part 4          --=_a7feaa8c5fdfa8743acc7cadc190adf0
                Content-Type: image/gif
                Content-Transfer-Encoding: base64
                Content-Disposition: inline; filename="mainlogo.gif"
                Content-ID: <ad177817e454e9f7ea4b1a57df1bae5b>
                
                
Part 5          --=_a7feaa8c5fdfa8743acc7cadc190adf0
                Content-Type: image/gif
                Content-Transfer-Encoding: base64
                Content-Disposition: inline; filename="solid.gif"
                
                --=_a7feaa8c5fdfa8743acc7cadc190adf0--
(Assignee)

Comment 40

9 years ago
(In reply to comment #38)
> As seen in Bug 532779, Mozilla uses part=1.2 for second part in
> multipart/mixed.

if it is child of toplevel part 0 then it doesn't per here:
http://mxr.mozilla.org/comm-central/source/mailnews/imap/src/nsImapServerResponseParser.cpp#2867

And the multipart with parent of rfc822/message takes on it's part number ("0" in this case) here:
http://mxr.mozilla.org/comm-central/source/mailnews/imap/src/nsIMAPBodyShell.cpp#967
(Assignee)

Comment 41

9 years ago
(In reply to comment #36)
> 
> With no steps to repeat and only very occasional reports of this we're not

STR:
1. write and save blank message to draft in local folders.
2. open drafts in editor and replace with attached second message all of the step one message from the x-mozilla flags down.
3. reindex local folder drafts and copy to IMAP folder for observation of problem.
(Assignee)

Comment 42

9 years ago
based on attached email messages the dependency bug doesn't apply.
Please reset if I'm wrong.
No longer depends on: 468595
(Assignee)

Comment 43

9 years ago
Can we just fetch all with body type == "text" and let the display handle rendering plain text or sanitizedHTML or originalHTML.
(In reply to comment #40)
> (In reply to comment #38)
> > As seen in Bug 532779, Mozilla uses part=1.2 for second part in multipart/mixed.
> if it is child of toplevel part 0 then it doesn't per here:
> .../nsImapServerResponseParser.cpp

part=1.2 in that bug is for attachment display of mail in local mail folder. Sorry for my confusion and no care on IMAP.

Bug 516211 is for similar phenomenon to comment #0, to which next in comment #3 is applicable.  
> (Workaround: Select View/Attachement Display Inline)
In that bug, mail has comlex structure, and "Disk cache" is used by Tb 3 instead of very small memory cache for IMAP mail(may be 4MB).
Phil Lacy, can you look into Bug 516211.
(Assignee)

Comment 45

9 years ago
Created attachment 416312 [details] [diff] [review]
fetches text/html in body of top-level multipart (part 0)

Hopefully it is ok to submit a patch on your bug, but BODYSTRUCTURE seems to be problematic without tests and I don't mind debugging them.

This tests for bodystructures like:
(rfc822/message
  (related
     (text/plain)
     (text/html)
     (content other)
  )
)

This patch is not formatted for, hopefully, improved reading.

I tested with example 2 but that has text/html only. I'll try making a test email with text/plain only and see if it works.  I got a feeling it won't.
Attachment #416312 - Flags: review?(bienvenu)
Assignee: bienvenu → philbaseless-firefox
Summary: [MIME] "This body part will be downloaded on demand" strikes back, Mozilla 1.7rc2 → [MIME] "This body part will be downloaded on demand" strikes back
Target Milestone: mozilla1.9alpha8 → ---
(Assignee)

Comment 46

9 years ago
if a message body doesn't have text/plain but only text/html then setting to display original html shows download on demand (DOD) message, with this latest patch that is.

We really should be fetching all text body types. If not then the message is cached according to the setting of view->body-as, and then when the user switches it doesn't do another fetch it just displays the DOD message in cache.
(Assignee)

Comment 47

9 years ago
Created attachment 417345 [details] [diff] [review]
fetches text in body of top-level multipart (part 0)

this patch is built on top of bug 244741.

This gets text in top-level. It has a rather pathetic default of fetching the plain text if it is html and last text part. I don't know what case we have two text parts without alternative. Probably this can just load the text part regardless of preferPlainText setting? See what you think.
Attachment #416312 - Attachment is obsolete: true
Attachment #417345 - Flags: superreview?(bienvenu)
Attachment #417345 - Flags: review?(bienvenu)
Attachment #416312 - Flags: review?(bienvenu)
(Assignee)

Comment 48

9 years ago
from this bug patch and bug 244741 I can solve the problems I see in bodystructure messages except one I fabricated which I can catch later:
part 0 message/rfc822
part 0 multipart/related
part 1 text/plain   download on demand under original html view
part 2 other
...
end

haven't tried but if the part 1 and plaintextonly setting were both toggled it may be DOD under plain view.
(Assignee)

Updated

9 years ago
Flags: blocking-thunderbird3.1?

Updated

9 years ago
Duplicate of this bug: 535202

Comment 50

9 years ago
Comment on attachment 417345 [details] [diff] [review]
fetches text in body of top-level multipart (part 0)

same comment as before about the unneeded elses...

I can't think of a way to write a unit test for this, unfortunately...
Attachment #417345 - Flags: superreview?(bienvenu)
Attachment #417345 - Flags: superreview+
Attachment #417345 - Flags: review?(bienvenu)
Attachment #417345 - Flags: review+
(Assignee)

Comment 51

9 years ago
Created attachment 421759 [details] [diff] [review]
added some reformatting and fix the 'else' nit

did some reformatting you better look at.
Attachment #417345 - Attachment is obsolete: true
Attachment #421759 - Flags: review?(bienvenu)
(In reply to comment #51)
> added some reformatting and fix the 'else' nit

If multipart/related, start parameter can be specified. Can your patch be torelant with start parameter?
(bug 471402 is for known problem when start is specified)
(Assignee)

Comment 53

9 years ago
(In reply to comment #52)
> (In reply to comment #51)
> > added some reformatting and fix the 'else' nit
> 
> If multipart/related, start parameter can be specified. Can your patch be
> torelant with start parameter?
> (bug 471402 is for known problem when start is specified)

I can't test, that bug applies to local store as well.
(In reply to comment #53)
> I can't test, that bug applies to local store as well.

I see. I'll check wheteher IMAP specific problem occurs or not in bug 471402, after this bug wiil be fixed.
(Assignee)

Comment 55

9 years ago
Comment on attachment 421759 [details] [diff] [review]
added some reformatting and fix the 'else' nit

>+      // This is the first text part of a top-level multipart of the toplevelmessage
>+      if (m_parentPart->GetType() == IMAP_BODY_MULTIPART &&
>+          !PL_strcmp(m_parentPart->GetPartNumberString(), "0") &&
>+          !PL_strcasecmp(m_bodyType, "text") &&
>+          ((!PL_strcasecmp(m_bodySubType, "plain") && preferPlainText) ||
>+            (!PL_strcasecmp(m_bodySubType, "html") && !preferPlainText)))
>+         return PR_TRUE;
> 

If this is the first text part of a top-level multipart of toplevel message then won't it only have one text part and we should fetch it regardless of preferPlainText setting?
(Assignee)

Comment 56

9 years ago
yes that takes care of the plain text part I mentioned in IRC

multipart/related

text/plain

image/jpg other parts.

The above top level text was download on demand if view was set for HTML.
A multipart/related wouldn't happen with plain text I don't think but any text should be fetched and only those in alternative need scrutiny.
(Assignee)

Comment 57

9 years ago
Comment on attachment 421759 [details] [diff] [review]
added some reformatting and fix the 'else' nit

needs further work
Attachment #421759 - Flags: review?(bienvenu)
(Assignee)

Comment 58

9 years ago
Created attachment 422088 [details] [diff] [review]
added some reformatting and fix the 'else' nit

the previous patch fetched all text even attachments txt files.  This limits it to part 1 of top level.  I have a reminder comment that there is nothing to limit ordering of parts in messages. If you know of one I can remove the comment and we are ok to go.  If not we need to check for disposition 'attachment'
Attachment #421759 - Attachment is obsolete: true
Attachment #422088 - Flags: review?(bienvenu)
(Assignee)

Comment 59

9 years ago
Created attachment 422089 [details] [diff] [review]
adds body disposition and body language to imapbodyshell, rfc 3501

See what you think about getting these added to a body shell for leaf
Attachment #422089 - Flags: review?(bienvenu)

Comment 60

9 years ago
Comment on attachment 422088 [details] [diff] [review]
added some reformatting and fix the 'else' nit

wouldn't this just be return (if clause) ?

+      if (m_parentPart->GetType() == IMAP_BODY_MULTIPART &&
+          !PL_strcasecmp(m_bodyType, "text") &&
+          !PL_strcmp(m_parentPart->GetPartNumberString(), "0") &&
+          !PL_strcmp(m_partNumberString, "1"))
+         return PR_TRUE;
+
       return PR_FALSE;  // we can leave it on the server

In any case, testing the patches now.
(Assignee)

Comment 61

9 years ago
(In reply to comment #60)
> (From update of attachment 422088 [details] [diff] [review])
> wouldn't this just be return (if clause) ?
> 

I like that. Bug 244741 introduces some more instances of just returning the if clause. You can see them in the upstream from this clause as that bug needs to be applied before this one.  I can make fix those here as well.
(Assignee)

Comment 62

9 years ago
(In reply to comment #61)
 
> ...some more instances of just returning the if
> clause....

ha ignore this if you haven't aleady
(Assignee)

Comment 63

9 years ago
Created attachment 425603 [details] [diff] [review]
composite patch of 244741 and 246415

Comment 64

9 years ago
Comment on attachment 425603 [details] [diff] [review]
composite patch of 244741 and 246415

this works for me - Phil, do you want me to just land this combined patch?
Attachment #425603 - Flags: superreview+
Attachment #425603 - Flags: review+
(Assignee)

Comment 65

9 years ago
yes, I wouldn't wait for my tests even though I'm gradually making some progress on them.

Comment 66

9 years ago
fix checked in - should both these bugs be resolved fixed? I agree that holding for the tests is not the right thing to do, since they're going to involve adding whole new functionality to the fake imap server.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Flags: blocking-thunderbird3.1?
Resolution: --- → FIXED

Updated

9 years ago
Attachment #422088 - Attachment is obsolete: true
Attachment #422088 - Flags: review?(bienvenu)

Comment 67

9 years ago
If by "fix checked in" you mean http://hg.mozilla.org/comm-central/rev/7e42eca3bfaf as its comment implies, this is just a change to a comment. Are you sure that you got the right patch?

Comment 68

9 years ago
thx very much for catching that - correct patch pushed now.

Comment 69

9 years ago
(In reply to comment #68)
> thx very much for catching that.

Thanks to an RSS feed https://hg.mozilla.org/comm-central/atom-log of all changes to comm-central that I scan sometimes.
Blocks: 244741
Target Milestone: --- → Thunderbird 3.1b1
(Assignee)

Updated

9 years ago
Duplicate of this bug: 244741
(Assignee)

Comment 71

9 years ago
David still needs to give some thought to attachment 422089 [details] [diff] [review]

Comment 72

9 years ago
Comment on attachment 422089 [details] [diff] [review]
adds body disposition and body language to imapbodyshell, rfc 3501

until we have a use for it, I don't want to add code that parses it because it can only add risk...but if we can find a use for it, and expose it to the outside world, then we can reconsider.
Attachment #422089 - Flags: review?(bienvenu) → review-
(Assignee)

Comment 73

9 years ago
(In reply to comment #72)
> (From update of attachment 422089 [details] [diff] [review])
> until we have a use for it, I don't want to add code that parses it because it
> can only add risk...but if we can find a use for it, and expose it to the
> outside world, then we can reconsider.

re: your one message that displayed attachments inline as 'download on demand'

"
html or plain text message.

---------------------------------------------------------
This part will be downloaded on demand
"

This is what made me think about adding the body disposition so we can determine that it is an attachment and not inline, if that makes sense.
I don't think it should even show a placeholder for an attachment like this. 

I'm not sure if that is an editor or mime bug or if it is intentional.

Updated

9 years ago
Duplicate of this bug: 516211
(Assignee)

Comment 75

9 years ago
Bug 540676 has test for this.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.