IdHeaderList bug

Giganews Newsgroups
Subject: IdHeaderList bug
Posted by:  Ivanov V K (xui…@yandex.ru)
Date: Sun, 30 Nov 2003

When sending mail with long subject field, i've got the following problem:

Received: from dial-up196.san.ru ([217.107.19.196]:40209 "EHLO ferro"
        smtp-auth: "more-dope" TLS-CIPHER: <none> TLS-PEER-CN1: <none>)
        by mail.yandex.ru with ESMTP id <S687329AbTK3Pcl>;
        Sun, 30 Nov 2003 18:32:41 +0300
From:  xui…@yandex.ru
Subject: Beginne mit Statistik =?ISO-8859-1?Q?f=FCr?= LOCALHOST - C:\VERY
=?ISO-8859-1?Q?=E4=E0 =E8 =F1 =F0=F3=F1=EA=E8=EC=E8?=

LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOO
DIRECTORY
=?ISO-8859-1?Q?NAME\=C1=CB=DF\=C1=CB=DF\=C1=CB=DF=DF=DF=DF=DF=DF=DF=DF=DF?=
Message-Id: <20031130153251Z687329-18877+…@mail.yandex.ru>
To:    unlisted-recipients:; (no To-header on input)
Date:  Sun, 30 Nov 2003 18:32:41 +0300

=?ISO-8859-1?Q?=DF=DF=DF=DF=DF=DF=DF=DF=DF!\EQM=5FDEMO.FDB?= + 30.11.2003
18:32:37
To: xui…@yandex.ru
Date: Sun, 30 Nov 2003 18:32:41 +0300

You see, Subject is torn and appears as a part of a message along with other
headers.

Right now i've fixed like this
line 820 in Unit IdMessage (indy 9.0.14)
Try
  With Result Do
  Begin
  Values['From'] := EncodeAddressItem(From, HeaderEncoding, TransferHeader,
ISOCharSet); {do not localize}
  FoldLines := False; //added by vic
  Values['Subject'] := EncodeHeader(Subject, [], HeaderEncoding,
TransferHeader, ISOCharSet); {do not localize}
  FoldLines := True;  //added by vic

and it works... But i'm aware of the fact that fix is errorprone and i hope
you will do something with the function FoldWrapText,
cause it IS the trouble maker (and it's not changed in 10) , but i'm not
skilled enough to fix it.

Thank you in advance.

Replies