in reply to Output CSV-file, can't get filename recognized.

Have you tried it with different browsers? User agents are pretty much free to ignore any Content-Disposition header.

BTW this post talks about \n being possibly harmful.

Replies are listed 'Best First'.
Re^2: Output CSV-file, can't get filename recognized.
by punch_card_don (Curate) on Jan 30, 2008 at 19:14 UTC
    Genius. Pure genius.

    The post you linked to reminded me to check my "\n", and as you'll see on double-checking my original post, I forgot a "\n" at the end of the first line. Fixing that made it work.

    Thanks.

      ... and the missing newline explains exactly what happened:
      The browser treated everything up to the first newline as a content-type, didn't recognize it, and therefore opened as "save as" dialog instead of displaying it.

      And it had no filename specification, so it used the script name from the URL.