All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mads Martin Joergensen <mmj@mmj.dk>
To: mlmmj@mlmmj.org
Subject: Re: Fw: footer isn't appended to multipart messages (part II: reality check!)
Date: Tue, 19 Jul 2005 08:05:18 +0000	[thread overview]
Message-ID: <20050719080518.GP83227@mmj.dk> (raw)
In-Reply-To: <200507052130.02825.lists@seattleserver.com>

* Jakob Hirsch <jh@plonk.de> [Jul 19. 2005 09:59]:
> >>and text, with or without attachment). Everybody feel free to send
> >>something else to test@list.ymmv.de.
> > People, please send all kinds of potential mails breaking this to this
> > list. I would really like to have this tested.
> 
> Found 1 non-working case already: Pine uses an all upper-case
> Content-Type line, strstr("boundary") fails. There is a strchrstr() on
> my system, but it seems to be a GNUism (even without having a man-page),
> so I have to invent my own.

Look at findit(). It uses strncasecmp().

> >>Possible problems I see:
> >>
> >>- as I did no full parsing of the Content-Type header, the recognition
> >>of the boundary is not 100% reliable, but it's very unlikely that
> >>;boundary=" is something else.
> > How hard would it be to parse it completely?
> 
> Depends on what can possibly appear in the Content-Type line. Until now,
> all I ever saw there was 'multipart/something; boundary="...."' at most.
> I have to investigate.

It doesn't really matter what one have ever seen, it only matters what
is possible according to standards.

> >>- I only handle multipart/mixed and multipart/alternative, everything
> >>else is assumed to be plain text, which is probably not true but it's
> >>also the former behaviour. Maybe it's better to re-encapsulate
> >>everything that is not already multipart/mixed. What do you think?
> > But if it's assumed to be text/plain, then the behaviour is as before,
> > no more, no less?
> 
> Yes. In most cases you'll get the old behaviour if something goes wrong.
> Worst case is no footer at all, but then the user won't have seen it anyway.

Fine. If only it's not a regression.

> >>- Finding the close delimiter of multipart/mixed messages will not work
> >>if there is (too much) text after the closing delimiter. This should
> >>normally not happen, as this text will not be displayed by mail clients
> >>(which was the why this came up at all). I think this is a minor issue.
> > What does "too much text" mean in this case?
> 
> The code goes back 2*strlen(boundary)-1, so the garbage has to be less
> than strlen(boundary), which is about 10..30 chars. I could read a
> bigger buffer or even consecutively read back overlapping blocks. Hmm,
> not too hard to do, so maybe I should stick to reliability.

mlmmj is all about reliability :-)

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.

  parent reply	other threads:[~2005-07-19  8:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-05 21:30 footer isn't appended to multipart messages Casey Allen Shobe
2005-07-05 22:09 ` Sven 'Darkman' Michels
2005-07-05 23:32 ` footer isn't appended to multipart messages (part II: reality check!) Patrick Bennett
2005-07-06  2:38 ` Casey Allen Shobe
2005-07-06  6:17 ` Fw: " Patrick Bennett
2005-07-06  8:05 ` footer isn't appended to multipart messages Mads Martin Joergensen
2005-07-06  8:12 ` footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-07-06  8:15 ` Mads Martin Joergensen
2005-07-06 13:00 ` Fw: " Morten K. Poulsen
2005-07-07 15:31 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-07-07 16:07 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-07-09 18:10 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-07-15 14:29 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-07-16 13:12 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-07-16 14:52 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-07-18  9:49 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-07-18 18:12 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-07-18 23:26 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-07-19  7:25 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-07-19  7:59 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-07-19  8:05 ` Mads Martin Joergensen [this message]
2005-07-19 18:44 ` Jakob Hirsch
2005-07-19 22:09 ` Jakob Hirsch
2005-07-20  6:18 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-10-10  5:28 ` Mads Martin Joergensen
2005-10-10 21:41 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-10-10 21:47 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Neale Pickett
2005-10-10 22:08 ` Fw: footer isn't appended to multipart messages (part II: reality Jakob Hirsch
2005-10-11  0:15 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-10-11  3:06 ` Neale Pickett
2005-10-11  7:52 ` Fw: footer isn't appended to multipart messages (part II: Jakob Hirsch
2005-10-11  8:52 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-10-11  9:30 ` Fw: footer isn't appended to multipart messages (part II: Jakob Hirsch
2005-10-11 12:24 ` Fw: footer isn't appended to multipart messages (part II: reality check!) Mads Martin Joergensen
2005-10-11 12:55 ` Neale Pickett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050719080518.GP83227@mmj.dk \
    --to=mmj@mmj.dk \
    --cc=mlmmj@mlmmj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.