Bug 3785 - Headers in extraheaderrc lose name on sending
Summary: Headers in extraheaderrc lose name on sending
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.15.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2017-03-17 09:30 CET by Ricardo Mones
Modified: 2017-03-19 15:31 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Mones 2017-03-17 09:30:01 CET
Steps to reproduce:

• Have some header in extraheaderrc, for example:
  $ echo "X-Test-Header:" >> ~/.claws-mail/extraheaderrc
• Start Claws Mail and open Compose window
• Select "X-Test-Header:" in one entry's combobox
• Input some value on the entry, for example "test value"
• Send the message (probably 'Send later' is enough, but haven't tested)
• Go to the folder your sent messages are saved and view source of the just
  sent message (or queue, if you 'Send later')

Expected line in message: "X-Test-Header: test value"

Actual line in message: "(null) test value"

That's a regression, so probably should be addressed before release. Probably related to http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=c0505b80
but not sure.

Thanks in advance,
Comment 1 wwp 2017-03-17 09:57:02 CET
Same problem when sending a message after adding a custom header (provided that the compose window's header name is editable).
I also noticed that such header has no space between the header name and value, like:
(null):foo
Comment 2 Ricardo Mones 2017-03-18 01:41:25 CET
A git bisect session has confirmed the first commit where this is broken is c0505b80.

Looking at the patch seems the compose_untranslated_header_name() added in that commit should not return NULL if the header is unknown, maybe should simply return the header as is. Rationale: unknown headers are not translatable, so they're already untranslated.
Comment 3 wwp 2017-03-18 14:09:35 CET
I'll give this a closer look during this week-end, hopefully fixing it (be)for(e) the string freeze.
Comment 4 users 2017-03-19 12:15:03 CET
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2017-03-19 12:15:03.148402605 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=1386a3cb95cb1877acaaacc13e2b56ba0191a44d
Merge: bcc89fb 3595d6c
Author: Colin Leroy <colin@colino.net>
Date:   Sun Mar 19 12:15:02 2017 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=3595d6c6256678ffcada8eb3cc570c5d70d770c3
Author: wwp <wwp@free.fr>
Date:   Sun Mar 19 12:13:28 2017 +0100

    Fix bug 3785: custom headers not stored in queued messages (and thus,
    not sent).