From: Ken Coar
-$Revision: 1.32 $ ($Date: 1997/04/21 22:27:57 $)
+$Revision: 1.33 $ ($Date: 1997/04/21 22:43:23 $)
If you are reading a text-only version of this FAQ, you may find numbers
@@ -21,10 +21,6 @@ do not appear, and are not needed, for the hypertext version.
-
-
-
-
@@ -124,6 +120,9 @@ do not appear, and are not needed, for the hypertext version.
Apache Server Frequently Asked Questions
+ In order to improve network performance, Apache buffers script output + into relatively large chunks. If you have a script that sends + information in bursts (such as partial-done messages in a multi-commit + database transaction, perhaps), the client will not necessarily get + the output as the script is generating it. +
++ To avoid this, Apache recognises scripts whose names begin with + "nph-" as non-parsed-header scripts. + That is, Apache won't buffer their output, but connect it directly to + the socket going back to the client. +
++ While this will probably do what you want, there are some + disadvantages to it: +
++ As an example how you might handle the former (in a Perl script): +
+
+
+ - if ($0 =~ m:/*nph-:) {
+
+
+ $HTTP_headers =
+ "HTTP/1.1 200 OK\015\012";
+
+
+ $HTTP_headers .=
+ "Connection: close\015\012";
+
+
+ printf ($HTTP_headers);
+
+ };
+
+
+
+ + and then follow with your normal non-nph headers. +
+