Re: Bug in IdMessageClient (Indy 10.0.52)

Giganews Newsgroups
Subject: Re: Bug in IdMessageClient (Indy 10.0.52)
Posted by:  Remy Lebeau (TeamB) (
Date: Wed, 22 Dec 2004

"Holger Dors" <do…> wrote in message

> there's a small bug in IdMessageClient.pas when sending an TidText
> message part in QuotedPrintable encoding and a line starts with a "."

This is already a known issue to Indy's developers and has already been
addressed for a future release.

> Here's my proposed change

The fix is a little more involved than that.  There are other factors at
work that needed addressing as well.

> In other words: encode first, then check if the line starts with a '.'

Yes, that is correct, but there are other things that need to be performed
as well which were not being done.  For example, in the code you show,
TIdMessageClient assumes that the string returned by the encoder will only
have one line in it, but EncodeString() can actually return multiple lines
(inlined EOLs) for long lines.  Each one of those lines has to be checked
for '.', so the encoded string has to be broken up so that each line can be
checked properly.  That is the main reason why I added additional overloaded
versions of EncodeString(), one of which can return a TIdStrings instead of
a String.  That makes the checking easier on TIdMessageClient's part since
multiple encoded lines are not concatenated together by EncodeString()



In response to

Bug in IdMessageClient (Indy 10.0.52) posted by Holger Dors on Wed, 22 Dec 2004