After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 137865 - duplicate custom headers are overwritten
duplicate custom headers are overwritten
Status: RESOLVED OBSOLETE
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal minor
: ---
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2004-03-21 19:03 UTC by Søren Boll Overgaard
Modified: 2011-12-03 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Søren Boll Overgaard 2004-03-21 19:03:22 UTC
A Debian user reported the following bug:

When manualy adding headers, if the headers are identical, only the last
one is sent in the post. I am assuming that this is because the custom
headers are added to a hash-map during the posting process, causing only
the last one to be added.

Details at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=238324

I have verified the existance of this bug, though I have been unable to
determine if duplicate headers are actually allowed by RFC standards.
Comment 1 Charles Kerr 2006-06-27 22:52:32 UTC
Bumping out of the `OBSOLETE' pool: this issue is still true for 0.101.

I'll need to check about duplicate headers too.
Comment 2 Duncan 2006-08-10 17:15:25 UTC
I'm not sure about news, but mail and therefore Internet message formats in general can take multiple headers of the same type.  Consider the Received headers in mail, and it's obvious multiples are allowed.

Note that this isn't exactly "duplicate", as the header label is the same, but value (as in the Debian bug example) differs.

x-example: content one
x-example: content two

are different, and allowed in at least some cases, where

x-example: content one
x-example: content one

may or may not be allowed as exact duplicates in value as well.

Again, check the Received: headers in mail, where two, three, often more, are very very common.
Comment 3 Charles Kerr 2007-01-24 16:13:05 UTC
All of our custom headers are added to the GMimeMessage object
via a call to g_mime_message_set_header(), which stores the
headers in a hash table keyed by the header name.

IMO the headaches added by allowing a GMimeHeader to have multiple
headers of the same name would cause far more headaches than it's
worth, but I guess that should be fejj's call.

Bumping upstream to GMime with a recommendation of NOTABUG/WONTFIX.
Comment 4 Jeffrey Stedfast 2007-02-06 19:00:57 UTC
you want to use g_mime_message_add_header()

set_header() overwrites the previous value for that header if that header already exists in the list, else it adds a new one.


If that doesn't solve the problem for you guys, let me know.
Comment 5 Charles Kerr 2007-02-06 19:30:34 UTC
Thanks fejj