<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 28: Sending empty message drops headers</title><link href="https://sourceforge.net/p/beepcore-java/bugs/28/" rel="alternate"/><link href="https://sourceforge.net/p/beepcore-java/bugs/28/feed.atom" rel="self"/><id>https://sourceforge.net/p/beepcore-java/bugs/28/</id><updated>2002-11-19T03:11:00Z</updated><subtitle>Recent changes to 28: Sending empty message drops headers</subtitle><entry><title>Sending empty message drops headers</title><link href="https://sourceforge.net/p/beepcore-java/bugs/28/" rel="alternate"/><published>2002-11-19T03:11:00Z</published><updated>2002-11-19T03:11:00Z</updated><author><name>Kevin Gross</name><uri>https://sourceforge.net/u/klg418/</uri></author><id>https://sourceforge.net4d1a33fc3ca15511415bac2351b1a4d5da1d13d9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Sending an empty OutputDataStream does not&lt;br /&gt;
send the headers.&lt;/p&gt;
&lt;p&gt;Basic steps:&lt;br /&gt;
1) Create MimeHeaders;&lt;br /&gt;
2) Set some header values;&lt;br /&gt;
3) Create OutputDataStream(headers);&lt;br /&gt;
4) Call setComplete()&lt;br /&gt;
5) Channel.sendMSG(output);&lt;/p&gt;
&lt;p&gt;The receiving end gets the message, but there are&lt;br /&gt;
no MIME headers defined.&lt;/p&gt;
&lt;p&gt;Looking at Channel and how it uses the &lt;br /&gt;
OutputDataStream.availableSegment(), I think the &lt;br /&gt;
availableSegment() method needs to return true if there &lt;br /&gt;
are any MIME headers defined and the headers have not &lt;br /&gt;
been sent or when !buffer.isEmpty(). Just a thought.&lt;/p&gt;
&lt;p&gt;If I add my own zero-length BufferSegment, it works.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>