You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the mu:body message method is called on a MIME message after a call to mu:header, the body text is duplicated in the returned value.
To Reproduce
With the commits from PR #2801 applied, add the following test to the test-message function in test-mu-guile.scm:
(str-equal-or-exit (mu:body msg)
"Hello world, forwarding some RFC822 message\n")
If you add it before the call to mu:header, it will pass. If you add it after, you get:
not ok /guile/message - ERROR:../guile/tests/test-mu-guile.cc:89:void test_something(const char*): assertion failed: (0)
Bail out!
----------------------------------- stderr -----------------------------------
*ERROR*: Expected "Hello world, forwarding some RFC822 message
", got "Hello world, forwarding some RFC822 message
Hello world, forwarding some RFC822 message
Environment
This is on Guix with Guile 3.0.9.
mu is v1.12.8 with the commits from PR #2801 applied.
Checklist
[✓] you are running either the latest 1.4.x release, or a 1.5.11+ development release (otherwise, please upgrade).
Analysis
I did some debugging, and I believe the problem happens because mu:c:get-parts and mu:c:get-header call Message::unload_mime_message() at the end.
Because of this, next time Message::load_mime_message() gets called, priv_->mime_msg will be empty and fill_document(*priv_) will add a new instance of the body text in accumulate_text().
The text was updated successfully, but these errors were encountered:
Somewhere along the way, the body-txt and body-html fields were merged
into a single body field. Later, commit 8eac392 ("guile: re-enable
the guile support") finally removed support for Field::Id::BodyHtml from
mu:c:get-field.
Unfortunately mu.scm and the documentation are still stuck in the past, so
update them. mu:body-txt is now a synonym for mu:body, and mu:body-html
always returns #f.
I wanted to add a mu:body test also for the rfc822.1 message, but there's
currently a bug where its body text is is duplicated (issue djcb#2802), so the
test would fail.
The (current) guile bindings have been deprecated for quite some time, so i'm not planning to do much work on this. But perhaps we can quickly fix this,
Describe the item
When the
mu:body
message method is called on a MIME message after a call tomu:header
, the body text is duplicated in the returned value.To Reproduce
With the commits from PR #2801 applied, add the following test to the
test-message
function intest-mu-guile.scm
:If you add it before the call to
mu:header
, it will pass. If you add it after, you get:Environment
This is on Guix with Guile 3.0.9.
mu is v1.12.8 with the commits from PR #2801 applied.
Checklist
Analysis
I did some debugging, and I believe the problem happens because
mu:c:get-parts
andmu:c:get-header
callMessage::unload_mime_message()
at the end.Because of this, next time
Message::load_mime_message()
gets called,priv_->mime_msg
will be empty andfill_document(*priv_)
will add a new instance of the body text inaccumulate_text()
.The text was updated successfully, but these errors were encountered: