static AggregatedHttpResponse of(Iterable<ResponseHeaders> informationals, ResponseHeaders headers,
                                     HttpData content, HttpHeaders trailers) {

        requireNonNull(informationals, "informationals");
        requireNonNull(headers, "headers");
        final HttpStatus status = headers.status();
        checkArgument(!status.isInformational(), "status: %s (expected: a non-1xx status)", status);

        requireNonNull(content, "content");
        requireNonNull(trailers, "trailers");

        if (headers.status().isContentAlwaysEmpty()) {
            if (!content.isEmpty()) {
                httpResponseUtilLogger.debug(
                        "Non-empty content found with an empty status: {}, content length: {}",
                        headers.status(), content.length());
                content.close();
                content = HttpData.empty();
            }
        }

        // Set the 'content-length' header if possible.
        final ResponseHeaders newHeaders =
                maybeUpdateContentLengthAndEndOfStream(headers, content, trailers, true);

        return new DefaultAggregatedHttpResponse(ImmutableList.copyOf(informationals),
                                                 newHeaders, content, trailers);
    }
Creates a new HTTP response.

@param informationals the informational class (1xx) HTTP headers
@param headers the HTTP headers
@param content the content of the HTTP response
@param trailers the HTTP trailers

@throws IllegalArgumentException if the status of the specified {@link ResponseHeaders} is
                                 {@linkplain HttpStatus#isInformational() informational}.
core/src/main/java/com/linecorp/armeria/common/AggregatedHttpResponse.java