List Info

Thread: Re: (patch) Another case of duplicate keys (via dbmail-smtp)




Re: (patch) Another case of duplicate keys (via dbmail-smtp)
country flaguser name
Italy
2008-03-05 05:37:42
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Rabbitson wrote:
> John Fawcett wrote:
>>
>> We can spend time trying to get this to work, but
I'm just wondering
>> whether we need to use g_mime_message_set_header at
all. Seeing as
>> in the end we must have only one Return-Path header
in the delivered
>> message and we are trying to update an existing
header, maybe it
>> would be easier to ignore existing return-path
headers and just
>> add our own: that way we also avoid duplicate
Return-Path
>> headers in the in-memory structure which is the
fundamental issue.
>>
> 
> I don't know much about C if anything, but just to
chime in. As far as I
> understand this code deals with general header
handling. Isn't it
> perfectly legal to have several X-headers with
absolutely the same
> values in a message? What happens then?

g_mime_message_set_header (in set_message_header) is also
being
used on other types of headers (during message composition
if I recall) so you're right that we cannot take
it out altogether.

However, the existing code cannot handle the
 case of multiple X- headers which have the same value: that
would
generate a Duplicate key.

John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org


iD8DBQFHzoYGd4I3jTtt9EIRAocfAJ9um1FNQdMmZ/C/CvFNYIqwSYYj6QCg
3OSK
9FUd8ZlAZEStJUcOrm0AEkc=
=u/fL
-----END PGP SIGNATURE-----
_______________________________________________
DBmail mailing list
DBmaildbmail.org
htt
ps://mailman.fastxs.nl/mailman/listinfo/dbmail

Re: (patch) Another case of duplicate keys (via dbmail-smtp)
country flaguser name
Italy
2008-03-05 05:56:58
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Fawcett wrote:
> However, the existing code cannot handle the
>  case of multiple X- headers which have the same value:
that would
> generate a Duplicate key.
> 
> John
Following up to my own post, ignore this, it's wrong.
Multiple headers are handled without producing an error
when they are read in from the original message, but
they result in a single entry in the dbmail_headervalue
cache.

That makes sense I think, since dbmail_headervalue is a
cache
it won't benefit from multiple entries with the same
values.

John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org


iD8DBQFHzoqKd4I3jTtt9EIRAvn2AJ0brtcxM281zG8HeMXBZiC8THqlOwCg
qEM2
cThlMUmTX0+xcFXZq30WZ3g=
=OMRa
-----END PGP SIGNATURE-----
_______________________________________________
DBmail mailing list
DBmaildbmail.org
htt
ps://mailman.fastxs.nl/mailman/listinfo/dbmail

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )