Problem
When header-rows or header-repeat is configured, the modified CSV profile is currently passed to CsvReader.ToDataReader.
That modified profile sets Header=false, which disables PocketCsvReader's normal header processing. Meanwhile, EnumerateCsvRows uses only the first record as the dynamic header.
As a result, additional configured header records can be emitted as data rows.
Expected behavior
When header-rows or header-repeat is configured, do not pass the modified profile to CsvReader.ToDataReader in a way that disables the required header handling.
Configured header records must be consumed as header metadata and must never appear in the normalized data stream.
Acceptance criteria
header-rows with more than one header record does not leak extra header records into data.
header-repeat does not cause repeated header rows to appear as data.
- Default single-header behavior remains unchanged.
- Add regression tests covering configured multi-row and repeated-header scenarios.
Problem
When
header-rowsorheader-repeatis configured, the modified CSV profile is currently passed toCsvReader.ToDataReader.That modified profile sets
Header=false, which disables PocketCsvReader's normal header processing. Meanwhile,EnumerateCsvRowsuses only the first record as the dynamic header.As a result, additional configured header records can be emitted as data rows.
Expected behavior
When
header-rowsorheader-repeatis configured, do not pass the modified profile toCsvReader.ToDataReaderin a way that disables the required header handling.Configured header records must be consumed as header metadata and must never appear in the normalized data stream.
Acceptance criteria
header-rowswith more than one header record does not leak extra header records into data.header-repeatdoes not cause repeated header rows to appear as data.