Skip to content

Commit

Permalink
Further clean up contents-length handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruedigergad committed Jun 15, 2016
1 parent 1b3f116 commit dc20a26
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,10 @@ public void run() {
}

public boolean offer(StompFrame frame) {
return this.offer(frame, true);
}

public boolean offer(StompFrame frame, boolean addContentLength) {
getDispatchQueue().assertExecuting();
if( this.transport.full() ) {
return false;
} else {
if( addContentLength && SEND.equals(frame.action()) ) {
frame.addContentLengthHeader();
}
return this.transport.offer(frame);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ public void write(DataOutput out) throws IOException {
write(out, true);
}

public void addContentLengthHeader() {
addHeader(CONTENT_LENGTH, new AsciiBuffer(Integer.toString(content.length())));
}

public int size() {
int rc = action.length() + 1;
if( headerList!=null ) {
Expand Down

0 comments on commit dc20a26

Please sign in to comment.