AFAIK: A http Publish request is distributed to apache, then piped through stdin and right into a CGI program.

Does apache guarantee the stdin stream will invariably come with an EOF ?

EOF is not a "character" or "marker" within the input EOF is definitely an error when trying to see and never getting more data available. Calls for example read or fread will return this being an error, for example confirming less was read than was asked for. (There is an EOF macro in C, but it is treated being an error code and is not a real character.)

EOF is signaled through the OS, not Apache, and despite the fact that Apache could pull some dirty methods (for example keeping the stream open but never writing), it does not.