开发者

Does apache guarantee that stdin will always have an EOF?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜