I think the difference is in how the file is being detected. The determination for csv vs plain is made by the TextAndCSVParser, not by a detector. So, if you run /detect, the detectors are run, but the parser is not called. My guess is that /meta runs the parser and thus triggers the within-parser detection.
I agree that this is unnerving. There was something fiddly about why I went with detection within the parser having to do with the detectors and the order they ran in. If you want, please open an issue, and maybe we can take a look again. On Wed, Jun 24, 2020 at 5:31 PM Maloney, Patrick (ITS) < [email protected]> wrote: > Hi, > > I’m getting some puzzling results using 1.24.1 server. I > don’t think this is specific to that version, however. > > > > I can pass a csv file to /meta/Content-Type with a > filename header hint of ‘Test.xxx’ (I deliberately misnamed the file) and I > get back ‘text/csv; charset=UTF-8; delimiter=comma’ which looks right to me. > > > > If I do the exact same thing, but call /detect/stream > instead, I get ‘text/plain’.. > > > > Why is the MIME type different depending on how I call the > server? This makes me very uneasy. Maybe I just don’t understand the > correct way to use this product. > > -Patrick > > >
