<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Imap_Client fails with literal data on setMetadata command</title> 
  <pubDate>Fri, 10 Apr 2026 00:02:41 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9565</link> 
  <atom:link rel="self" type="application/rss+xml" title="Imap_Client fails with literal data on setMetadata command" href="https://bugs.horde.org/ticket/9565/rss" /> 
  <description>Imap_Client fails with literal data on setMetadata command</description> 
 
   
   
  <item> 
   <title>When using the setMetadata() method and trying to set the /c</title> 
   <description>When using the setMetadata() method and trying to set the /comment value to &quot;Ä&quot; the generated IMAP output is incorrect:

C: 2 SETANNOTATION INBOX (&quot;/comment&quot; (&quot;value.shared&quot; {2+}
C: Ä
C: ))
S: 2 BAD Missing close paren in annotation attribute-values list

Working output would be:

DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
DEBUG: C: Ä)
DEBUG: S: A0002 OK Completed

I currently lacked the time to further investigate this but I can do so at a later time.Unless of course it is something totally trivial for Micheal :)</description> 
   <pubDate>Sat, 05 Feb 2011 22:27:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61730</link> 
  </item> 
   
  <item> 
   <title>&gt; Working output would be:
&gt;
&gt; DEBUG: C: A0002 SETANNOTATI</title> 
   <description>&gt; Working output would be:
&gt;
&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt; DEBUG: C: Ä)
&gt; DEBUG: S: A0002 OK Completed

This is incorrect also.  This should be:

DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
DEBUG: C: Ä
DEBUG: C: )
DEBUG: S: A0002 OK Completed

The &#039;)&#039; is part of the IMAP command, not the literal, so it needs to appear on a new line.

This has been fixed (I think; don&#039;t have an easy way to test at the moment):
http://lists.horde.org/archives/commits/2011-February/006677.html

It also looked like the &#039;SETMETADATA&#039; method was also broken - this should be fixed also.</description> 
   <pubDate>Tue, 08 Feb 2011 16:59:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61733</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Working output would be:
&gt;&gt;
&gt;&gt; DEBUG: C: A0002 SETANNOT</title> 
   <description>&gt;&gt; Working output would be:
&gt;&gt;
&gt;&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt;&gt; DEBUG: C: Ä)
&gt;&gt; DEBUG: S: A0002 OK Completed
&gt;
&gt; This is incorrect also.  This should be:
&gt;
&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt; DEBUG: C: Ä
&gt; DEBUG: C: )
&gt; DEBUG: S: A0002 OK Completed
&gt;
&gt; The &#039;)&#039; is part of the IMAP command, not the literal, so it needs to 
&gt; appear on a new line.

Ah, okay. The above command I posted was generated by the roundcube IMAP driver and I just copied it. The server apparently did not care about the misplaced parenthesis.

&gt;
&gt; This has been fixed (I think; don&#039;t have an easy way to test at the moment):

It fails with

(1297208022.0143) C: 2 SETANNOTATION
(1297208022.1472) S: 2 BAD Missing required argument to Setannotation

now. Testing is easy on my side as this just requires a short command line call. If you need more info just tell me. Thanks for investigating this!

&gt; http://lists.horde.org/archives/commits/2011-February/006677.html
&gt;
&gt; It also looked like the &#039;SETMETADATA&#039; method was also broken - this 
&gt; should be fixed also.
</description> 
   <pubDate>Tue, 08 Feb 2011 23:39:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61734</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; Working output would be:
&gt;&gt;&gt;
&gt;&gt;&gt; DEBUG: C: A0002 SETAN</title> 
   <description>&gt;&gt;&gt; Working output would be:
&gt;&gt;&gt;
&gt;&gt;&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt;&gt;&gt; DEBUG: C: Ä)
&gt;&gt;&gt; DEBUG: S: A0002 OK Completed
&gt;&gt;
&gt;&gt; This is incorrect also.  This should be:
&gt;&gt;
&gt;&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt;&gt; DEBUG: C: Ä
&gt;&gt; DEBUG: C: )
&gt;&gt; DEBUG: S: A0002 OK Completed

Hm, looks like that after your last commit now. The server is still unhappy though:

(1297234921.0173) C: 2 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
(1297234921.0177) C: Ä
(1297234921.0180) C: )
(1297234921.3045) S: 2 BAD Missing close paren in annotation attribute-values list


&gt;&gt;
&gt;&gt; The &#039;)&#039; is part of the IMAP command, not the literal, so it needs to
&gt;&gt; appear on a new line.
&gt;
&gt; Ah, okay. The above command I posted was generated by the roundcube 
&gt; IMAP driver and I just copied it. The server apparently did not care 
&gt; about the misplaced parenthesis.
&gt;
&gt;&gt;
&gt;&gt; This has been fixed (I think; don&#039;t have an easy way to test at the moment):
&gt;
&gt; It fails with
&gt;
&gt; (1297208022.0143) C: 2 SETANNOTATION
&gt; (1297208022.1472) S: 2 BAD Missing required argument to Setannotation
&gt;
&gt; now. Testing is easy on my side as this just requires a short command 
&gt; line call. If you need more info just tell me. Thanks for 
&gt; investigating this!
&gt;
&gt;&gt; http://lists.horde.org/archives/commits/2011-February/006677.html
&gt;&gt;
&gt;&gt; It also looked like the &#039;SETMETADATA&#039; method was also broken - this
&gt;&gt; should be fixed also.
&gt;</description> 
   <pubDate>Wed, 09 Feb 2011 07:05:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61736</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9565: N</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9565: Never send CRLF after literal

http://git.horde.org/horde-git/-/commit/0ee34548ff77cfabdb68bdb5c88832072e97bb05</description> 
   <pubDate>Wed, 09 Feb 2011 17:52:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61739</link> 
  </item> 
   
  <item> 
   <title>This is correct.  Forgot that the 8-bit character counts as </title> 
   <description>This is correct.  Forgot that the 8-bit character counts as 2 octets:

&gt;&gt;&gt;&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt;&gt;&gt;&gt; DEBUG: C: Ä)
&gt;&gt;&gt;&gt; DEBUG: S: A0002 OK Completed

This is incorrect: 

&gt;&gt;&gt; DEBUG: C: A0002 SETANNOTATION INBOX &quot;/comment&quot; (&quot;value.shared&quot; {2+}
&gt;&gt;&gt; DEBUG: C: Ä
&gt;&gt;&gt; DEBUG: C: )
&gt;&gt;&gt; DEBUG: S: A0002 OK Completed

The IMAP client code was properly outputting literal data when that data was being stored internally in a stream.  However, when the literal data was stored internally in a string, we were tacking on a CRLF after the literal data.  This was terminating the command early.  This should be fixed (for real this time).</description> 
   <pubDate>Wed, 09 Feb 2011 17:54:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61740</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9565: N</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9565: Need to send CRLF after literalplus request

http://git.horde.org/horde-git/-/commit/67ab4d8fe94d3387d9d7f708a6735ebecfedcbaa</description> 
   <pubDate>Wed, 09 Feb 2011 18:15:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61743</link> 
  </item> 
   
  <item> 
   <title>&gt;  This should be fixed (for real this time).

Confirmed :</title> 
   <description>&gt;  This should be fixed (for real this time).

Confirmed :) Thanks a lot!</description> 
   <pubDate>Wed, 09 Feb 2011 20:05:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9565#t61749</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
