From: Ken Coar Date: Mon, 21 Apr 1997 22:43:23 +0000 (+0000) Subject: Update comments and add nph-script Q&A. (BTW, "connexion" is *not* X-Git-Tag: APACHE_1_2b9~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5a61d14356fd9246248ab14a6862c5ee526f345;p=apache Update comments and add nph-script Q&A. (BTW, "connexion" is *not* a typo!) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77960 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/misc/FAQ.html b/docs/manual/misc/FAQ.html index 301f9658fd..98ec9c561d 100644 --- a/docs/manual/misc/FAQ.html +++ b/docs/manual/misc/FAQ.html @@ -8,7 +8,7 @@

Apache Server Frequently Asked Questions

-$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.

  • Why am I getting "httpd: could not set socket option TCP_NODELAY" in my error log?
  • +
  • How can I get my script's output without + Apache buffering it? +
  • @@ -926,6 +925,63 @@ do not appear, and are not needed, for the hypertext version.


    +
  • + How can I get my script's output without Apache buffering + it? + +

    + 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. +

    +