开发者

Does apache guarantee that stdin will always have an EOF?

开发者 https://www.devze.com 2023-01-18 00:03 出处:网络
AFAIK: A http POST request is sent to开发者_如何学编程 apache, then piped through stdin and into a CGI program.

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 ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消