开发者

With the Apache API, why feeding strings is done line by line ? Any reason?

开发者 https://www.devze.com 2023-02-09 06:41 出处:网络
I\'ve just starting playing with Apache, and I wanted know. If I base myself on the tutorial/examples I\'ve found, e.g. mod_example.c or mod_hello.c

I've just starting playing with Apache, and I wanted know.

If I base myself on the tutorial/examples I've found, e.g. mod_example.c or mod_hello.c the http seems always to be sent line by line:

开发者_开发技巧ap_rputs("<HTML><HEAD><TITLE>Greetings</TITLE></HEAD></BODY>\n",r);
ap_rputs("<H1>Greetings, Earthling</H1>\n",r);

Is it a readability issue, or there are real reasons for this ?


It's readability in many cases.

You could send the entire response (HTML, etc.) with ap_rputs() if you wanted to.

0

精彩评论

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