fix-connection_printf_to_buf 744 B

123456789101112131415
  1. * Code simplifications and refactoring:
  2. - Make connection_printf_to_buf's behaviour sane. Its callers
  3. expect it to emit a CRLF iff the format string ends with CRLF;
  4. it actually emits a CRLF iff (a) the format string ends with
  5. CRLF or (b) the resulting string is over 1023 characters long or
  6. (c) the format string does not end with CRLF ''and'' the
  7. resulting string is 1021 characters long or longer. Bugfix on
  8. 0.1.1.9-alpha; fixes part of bug 3407.
  9. - Make send_control_event_impl's behaviour sane. Its callers
  10. expect it to always emit a CRLF at the end of the string; it
  11. might emit extra control characters as well. Bugfix on
  12. 0.1.1.9-alpha; fixes another part of bug 3407.