Avoid crashing if a header value is empty.
  Ctrl-k works on input.

  The readline function has been reformatted to be neater too.