I'm playing with a simple chat room program

What program? What protocols does it use?

I need the server to sometimes do nothing, ie not reply to a request. If I do this I get an error from Apache

Well, don't do that then, or get apache to ignore it, or something else

If I send a blank header the browser tries to download it as it's getting a non-executable file

A "blank header" is nonsense , apache is probably fixing the headers for you so they're not blank (nonsense) anymore ... apache documents this

can this in fact be done at all?

Sure it can, if you learn about the internet you'll know the magic words

$ perl -MCGI -e " my $q = CGI->new; print $q->header(qw/ -status 204 - +nph 1/) " HTTP/1.0 204 Server: cmdline Status: 204 Date: Tue, 19 Nov 2013 13:58:00 GMT Content-Type: text/html; charset=ISO-8859-1

In reply to Re: no server response required (heartbeat http 204) by Anonymous Monk
in thread no server response required by adrianstern

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.