Skip to content
Permalink
Browse files

Fix for #53 Issue #53

  • Loading branch information
vladimirralev committed Jan 6, 2020
1 parent b586569 commit a15978d5251e2f67b0c4c45775c0277c4bef04e1
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gov/nist/javax/sip/header/SIPHeaderList.java
@@ -502,9 +502,11 @@ protected StringBuilder encodeBody(StringBuilder buffer) {
while (true) {
SIPHeader sipHeader = (SIPHeader) iterator.next();
if ( sipHeader == this ) throw new RuntimeException ("Unexpected circularity in SipHeaderList");

//This determines if a null body was added https://github.com/usnistgov/jsip/issues/53
int buffPosDelta = buffer.length();
sipHeader.encodeBody(buffer);
buffPosDelta -= buffer.length();
buffPosDelta -= buffer.length(); // if 0 nothing was added to the buffer
// if (body.equals("")) System.out.println("BODY == ");
if (iterator.hasNext()) {
if(buffPosDelta != 0) {

0 comments on commit a15978d

Please sign in to comment.
You can’t perform that action at this time.