elasticsearch/elasticsearch — pull request #5543 by hhoffstaette (2014-03-26 09:30:20+00:00)
Title: Fix for zero-sized content throwing off toChannelBuffer().

Also short-circuit writeTo(..) accordingly to avoid unnecessary work. This fixes an issue where 0-sized ContentLength replies (e.g. 404) would make some REST tests fail.