With the Apache API, why feeding strings is done line by line ? Any reason?
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.
精彩评论