views:

26

answers:

1

AFAIK: A http POST request is sent to apache, then piped through stdin and into a CGI program.

Does apache guarantee that the stdin stream will always have an EOF ?

A: 

EOF isn't a "character" or "marker" in the input; EOF is an error when attempting to read and not having more data available. Calls such as read or fread will return this as an error, such as reporting less was read than was requested. (There is an EOF macro in C, but it's treated as an error code and isn't an actual character.)

EOF is signaled by the OS, not Apache, and even though Apache could pull some dirty tricks (such as keeping the stream open but never writing), it doesn't.

Roger Pate