private ResponseHeaders addCommonHeaders(ResponseHeadersBuilder headers, HttpFileAttributes attrs,
                                             @Nullable String etag) {
        if (contentType != null) {
            headers.contentType(contentType);
        }
        if (dateEnabled) {
            headers.setTimeMillis(HttpHeaderNames.DATE, clock.millis());
        }
        if (lastModifiedEnabled) {
            headers.setTimeMillis(HttpHeaderNames.LAST_MODIFIED, attrs.lastModifiedMillis());
        }
        if (etag != null) {
            headers.set(HttpHeaderNames.ETAG, '\"' + etag + '\"');
        }

        headers.set(additionalHeaders);
        return headers.build();
    }
Generates the {@link ResponseHeaders} from the specified {@link HttpFileAttributes}.

@return the {@link ResponseHeaders}, or {@code null} if {@code attrs} is {@code null}.
core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFile.java