code: private void parseHeaderLine(Map<String, String> headers, String header) {
          final int colonOffset = header.indexOf(':');
          if (colonOffset == -1) {
              // This header line is malformed, skip it.
              return;
          }
          String headerName = header.substring(0, colonOffset).trim().toLowerCase();
          String headerValue = header.substring(header.indexOf(':') + 1).trim();
          if (getHeader(headers, headerName) != null) {
              // More that one heder of that name exists,
              // append to the list.
              headers.put(headerName, getHeader(headers, headerName) + ',' + headerValue);
          } else {
              headers.put(headerName, headerValue);
          }
      }
docs: Reads the next header line.
  
  @param headers String with all headers.
  @param header  Map where to store the current header.