<commit_before>unit class HTTP::Header;

use HTTP::Header::Field;

# headers container
has @.fields;

our grammar HTTP::Header::Grammar {
    token TOP {
        [ <message-header> \r?\n ]*
    }

    token message-header {
        $<field-name>=[ <-[:]>+ ] ':' <field-value>
    }

    token field-value {
        [ <!before \h> <quot> $<field-content>=[ <-['"\r\n]>+ ]  || \h+ ]* 
    }
    token quot {
        <['"]>?
    }
}

our class HTTP::Header::Actions {
    method message-header($/) {
        my $k = ~$<field-name>;
        if $k && $<field-value>.made -> $v {
            if $*OBJ.field($k) {
                $*OBJ.push-field: |($k => $v);
            } else {<commit_msg>Remove Special handling of quoted headers<commit_after>unit class HTTP::Header;

use HTTP::Header::Field;

# headers container
has @.fields;

our grammar HTTP::Header::Grammar {
    token TOP {
        [ <message-header> \r?\n ]*
    }

    token message-header {
        $<field-name>=[ <-[:]>+ ] ':' <field-value>
    }

    token field-value {
        [ <!before \h>  $<field-content>=[ <-[\r\n]>+ ]  || \h+ ]* 
    }
    token quot {
        <['"]>
    }
}

our class HTTP::Header::Actions {
    method message-header($/) {
        my $k = ~$<field-name>;
        if $k && $<field-value>.made -> $v {
            if $*OBJ.field($k) {
                $*OBJ.push-field: |($k => $v);
            } else {
{'fraction_non_alphanumeric': 0.21207764198418405, 'fraction_numerical': 0.0, 'mean_word_length': 1.9367088607594938, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 28, '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': '6112246', 'n_tokens_mistral': 515, 'n_tokens_neox': 486, 'n_words': 100}