GNU bug report logs - #32941
get_bug_log SOAP operation truncates message

Previous Next

Package: debbugs.gnu.org;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Fri, 5 Oct 2018 07:02:01 UTC

Severity: wishlist

Forwarded to https://bugs.debian.org/910360

To reply to this bug, email your comments to 32941 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to help-debbugs <at> gnu.org:
bug#32941; Package debbugs.gnu.org. (Fri, 05 Oct 2018 07:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to help-debbugs <at> gnu.org. (Fri, 05 Oct 2018 07:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: submit <at> debbugs.gnu.org
Subject: get_bug_log SOAP operation truncates message
Date: Fri, 05 Oct 2018 12:31:06 +0530
Package: debbugs.gnu.org

The get_bug_log operation of the SOAP API truncates some messages. For
example, look at the 4th message (indexing from 0) in bug 25235. In the
web interface, https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25235#17 ,
one can see that the message has 2 parts, but the get_bug_log SOAP
operation only returns the first part. The request XML I sent is as
follows.

<soap:Envelope 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/1999/XMLSchema" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    soapenc:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <soap:Body>
    <ns1:get_bug_log
	xmlns:ns1="urn:Debbugs/SOAP"
	soapenc:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <ns1:bugnumber xsi:type="xsd:int">25235</ns1:bugnumber>
    </ns1:get_bug_log>
  </soap:Body>
</soap:Envelope>




Information forwarded to help-debbugs <at> gnu.org:
bug#32941; Package debbugs.gnu.org. (Fri, 05 Oct 2018 10:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 32941 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 32941 <at> debbugs.gnu.org
Subject: Re: bug#32941: get_bug_log SOAP operation truncates message
Date: Fri, 05 Oct 2018 12:31:54 +0200
Arun Isaac <arunisaac <at> systemreboot.net> writes:

Hi Arun,

> The get_bug_log operation of the SOAP API truncates some messages. For
> example, look at the 4th message (indexing from 0) in bug 25235. In the
> web interface, https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25235#17 ,
> one can see that the message has 2 parts, but the get_bug_log SOAP
> operation only returns the first part.

I can confirm this. Debugging the Debbugs/SOAP software, it looks like
the Perl function Debbugs::MIME::getmailbody is responsible. In case of
multipart messages, it contains the following code:

--8<---------------cut here---------------start------------->8---
	# For other multipart types, we just pretend they're
	# multipart/mixed and run through in order.
	for my $part ($entity->parts) {
	    my $ret = getmailbody($part);
	    return $ret if $ret;
--8<---------------cut here---------------end--------------->8---

That is, the first non-empty message part is returned. That seems to be
not sufficient.

Debbugs::MIME::getmailbody is called in function Debbugs::MIME::parse,
which uses MIME::Parser internally. Interestingly, it has also fallback
code in case MIME::Parser fails to work. If I disable MIME::Parser
there, forcing the run the fallback code, the result looks as it should,
including all MIME parts. In fact, the 'body' part is just the email
body.

I suppose that the current behaviour is due to the fact, that there were
plans to return the other MIME parts as 'attachments'. This is not
implemented (yet), see the code of Debbugs::SOAP::get_bug_log.

Displaying the bug messages via the web server, does not use this
function. Therefore, all attachments are visible.

Calling get_bug_log(25235) via Debbugs/SOAP exposes also another
error. It returns the HTTP header lines

--8<---------------cut here---------------start------------->8---
HTTP/1.1 200 OK
Date: Fri, 05 Oct 2018 09:29:12 GMT
Server: Apache
SOAPServer: SOAP::Lite/Perl/1.11
Strict-Transport-Security: max-age=63072000
Content-Length: 47549
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: multipart/related; type="text/xml"; start="<main_envelope>"; boundary="=-=-="
--8<---------------cut here---------------end--------------->8---

The Content-Type: line is wrong, it should be just

--8<---------------cut here---------------start------------->8---
Content-Type: text/xml; charset=utf-8
--8<---------------cut here---------------end--------------->8---

Due to this wrong Content-Type: header, my Debbugs/SOAP client
(debbugs.el from GNU Emacs) refuses to work for get_bug_log(25235).

I've reported this to the Debian folks as
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910360>.

Best regards, Michael.




Set bug forwarded-to-address to 'https://debbugs.gnu.org/32941'. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Fri, 05 Oct 2018 10:52:02 GMT) Full text and rfc822 format available.

Changed bug forwarded-to-address to 'https://bugs.debian.org/910360' from 'https://debbugs.gnu.org/32941' Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Fri, 05 Oct 2018 10:56:01 GMT) Full text and rfc822 format available.

Information forwarded to help-debbugs <at> gnu.org:
bug#32941; Package debbugs.gnu.org. (Sun, 07 Oct 2018 11:48:01 GMT) Full text and rfc822 format available.

Message #15 received at 32941 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 32941 <at> debbugs.gnu.org
Subject: Re: bug#32941: get_bug_log SOAP operation truncates message
Date: Sun, 07 Oct 2018 13:46:53 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Arun,

> I suppose that the current behaviour is due to the fact, that there were
> plans to return the other MIME parts as 'attachments'. This is not
> implemented (yet), see the code of Debbugs::SOAP::get_bug_log.

Don Armstrong, the maintainer of the Debian debbugs package, has
confirmed this, see
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910360#15>. He
changed the severity to 'wishlist', so do I.

Best regards, Michael.




Severity set to 'wishlist' from 'normal' Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Sun, 07 Oct 2018 11:48:02 GMT) Full text and rfc822 format available.

Information forwarded to help-debbugs <at> gnu.org:
bug#32941; Package debbugs.gnu.org. (Mon, 08 Oct 2018 09:13:01 GMT) Full text and rfc822 format available.

Message #20 received at 32941 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 32941 <at> debbugs.gnu.org
Subject: Re: bug#32941: get_bug_log SOAP operation truncates message
Date: Mon, 08 Oct 2018 11:12:27 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Due to this wrong Content-Type: header, my Debbugs/SOAP client
> (debbugs.el from GNU Emacs) refuses to work for get_bug_log(25235).

This does not seem to be a bug in the debbugs server; it is rather a
problem in the soap-client.el package of Emacs. I've submitted bug#32983
for this.

Best regards, Michael.




Information forwarded to help-debbugs <at> gnu.org:
bug#32941; Package debbugs.gnu.org. (Mon, 08 Oct 2018 18:48:01 GMT) Full text and rfc822 format available.

Message #23 received at 32941 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 32941 <at> debbugs.gnu.org
Subject: Re: bug#32941: get_bug_log SOAP operation truncates message
Date: Tue, 09 Oct 2018 00:17:07 +0530
Hi,

I acknowledge your messages. I can't do much to help, at this
point. But, it's good to see you're making progress.

Thanks.




This bug report was last modified 5 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.