<commit_before>package org.jetbrains.ktor.content

import org.jetbrains.ktor.util.*

fun ByteArrayContent(bytes: ByteArray) = object : FinalContent.ByteArrayContent() {
    override val headers: ValuesMap
        get() = ValuesMap.Empty

    override fun bytes(): ByteArray = bytes
}<commit_msg>Fix ByteArrayContent to provide Content-Length header<commit_after>package org.jetbrains.ktor.content

import org.jetbrains.ktor.response.*
import org.jetbrains.ktor.util.*

fun ByteArrayContent(bytes: ByteArray) = object : FinalContent.ByteArrayContent() {
    override val headers by lazy {
        ValuesMap.build(true) {
            contentLength(bytes.size.toLong())
        }
    }

    override fun bytes(): ByteArray = bytes
}
{'fraction_non_alphanumeric': 0.10150891632373114, 'fraction_numerical': 0.0, 'mean_word_length': 3.8993288590604025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4638986', 'n_tokens_mistral': 212, 'n_tokens_neox': 205, 'n_words': 48}