Re: [gmime-devel] GMimeFilterHTML: ignoring URL at the end of part?
- From: Gaute Hope <eg gaute vetsj com>
- To: Jeffrey Stedfast <fejj gnome org>, gmime-devel-list gnome org
- Subject: Re: [gmime-devel] GMimeFilterHTML: ignoring URL at the end of part?
- Date: Fri, 29 May 2015 07:51:48 +0000
Excerpts from Jeffrey Stedfast's message of April 10, 2015 16:06:
Hi Gaute,
Just to rule out gmime_iostream.cc, can you write a simple program to do
this?
char buffer[4096];
ssize_t n;
while ((n = g_mime_stream_read (filtered_stream, buffer, 4096) > 0)
write (1, buffer, n);
Hi,
I just encountered a variation of the case where the same issue occured,
a test case email follows below. I had to change the above line to:
while ((n = g_mime_stream_read (content_stream, buffer, 4096), n) >= 0)
write (1, buffer, n);
that is; to also continue on 0 bytes read. According to the reference
-1 should be returned on failure. Am I overseeing something or can I use
it like this?
The issue only happens if there is a plain-text part in a multi-part
message with a link at the end (no newline afterwards), and there is no
other text before it! All other variations I have tested work fine. This
is being run through the html filter.
Cheers, Gaute
Delivery-date: Mon, 27 Oct 2014 06:15:16 +0100
From: tst asfdasas sdf
To: test gadsdfa sdf
Message-Id: <asdfasdf sas asdf asd>
Date: Mon, 27 Oct 2014 06:15:13 +0100
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_540ffd23a9176_53cd3ffb4d3fb2bc2852c3";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
----==_mimepart_540ffd23a9176_53cd3ffb4d3fb2bc2852c3
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
http://line-ignored.com
----==_mimepart_540ffd23a9176_53cd3ffb4d3fb2bc2852c3
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<a href="http://line-ignored.com">http://line-ignored.com</a>
----==_mimepart_540ffd23a9176_53cd3ffb4d3fb2bc2852c3--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]