code: private String guessMimeType(final ChannelBuffer buf) {
      final String mimetype = guessMimeTypeFromUri(request().getUri());
      return mimetype == null ? guessMimeTypeFromContents(buf) : mimetype;
    }
docs: Returns the result of an attempt to guess the MIME type of the response.
  @param buf The content of the reply to send.