message: fix(http): keep flushing until WOULDBLOCK is received
diff: @@ -129,14 +129,13 @@ impl<T: Write> Write for Buffered<T> {
  if self.write_buf.remaining() == 0 {
  Ok(())
  } else {
  - self.write_buf.write_into(&mut self.io).and_then(|n| {
  + loop {
  + let n = try!(self.write_buf.write_into(&mut self.io));
  debug!("flushed {} bytes", n);
  if self.write_buf.remaining() == 0 {
  - Ok(())
  - } else {
  - Err(io::Error::new(io::ErrorKind::WouldBlock, "wouldblock"))
  + return Ok(())
  + }
  }
  - })
  }
  }
  }
  @@ -295,7 +294,6 @@ impl WriteBuf {
  trace!("WriteBuf reserving initial {}", init);
  vec.reserve(init);
  } else if cap < MAX_BUFFER_SIZE {
  - trace!("maybe_reserve MAX={}, needed={}, cap={}", MAX_BUFFER_SIZE, needed, cap);
  vec.reserve(cmp::min(needed, MAX_BUFFER_SIZE - cap));
  trace!("WriteBuf reserved {}", vec.capacity() - cap);
  }
  