Commit 2996628f authored by brian's avatar brian
Browse files

PR: 2365

Updated certain questions for 1.3 - simplicity is always a good idea.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81480 13f79535-47bb-0310-9956-ffa450edef68
parent bbcb813b
Loading
Loading
Loading
Loading
+16 −63
Changes for docs/manual/misc/FAQ.html: 16 added lines, 63 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
  <!--#include virtual="header.html" -->
  <H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
  <P>
  $Revision: 1.118 $ ($Date: 1998/05/30 01:27:25 $)
  $Revision: 1.119 $ ($Date: 1998/06/06 15:39:26 $)
  </P>
  <P>
  The latest version of this FAQ is always available from the main
@@ -1091,19 +1091,15 @@
  <P>
  Apache does <EM>not</EM> send automatically send a cookie on every
  response, unless you have re-compiled it with the
  <A HREF="../mod/mod_cookies.html"><SAMP>mod_cookies</SAMP></A>
  module.
  This module was distributed with Apache prior to 1.2.
  This module may help track users, and uses cookies to do this. If
  you are not using the data generated by <SAMP>mod_cookies</SAMP>, do
  not compile it into Apache. Note that in 1.2 this module was renamed
  to the more correct name
  <A HREF="../mod/mod_usertrack.html"><SAMP>mod_usertrack</SAMP></A>,
  and cookies
  have to be specifically enabled with the
  <A HREF="../mod/mod_usertrack.html"><SAMP>mod_usertrack</SAMP></A>
  module, and specifically enabled it with the
  <A HREF="../mod/mod_usertrack.html#cookietracking"
  ><SAMP>CookieTracking</SAMP></A>
  directive.
  This module has been in Apache since version 1.2.
  This module may help track users, and uses cookies to do this. If
  you are not using the data generated by <SAMP>mod_usertrack</SAMP>, do
  not compile it into Apache. 
  </P>
  <HR>
 </LI>
@@ -1245,59 +1241,16 @@
      it?  Why doesn't my server push work?</STRONG>
     </A>
  <P>
  In order to improve network performance, Apache buffers script output
  into relatively large chunks.  If you have a script that sends
  information in bursts (eg. as partial-done messages in a multi-commit
  database transaction or any type of server push), the client will 
  not necessarily get the output as the script is generating it.
  </P>
  <P>
  To avoid this, Apache recognizes scripts whose names begin with
  &quot;<SAMP>nph-</SAMP>&quot; as <EM>non-parsed-header</EM> scripts.
  That is, Apache won't buffer their output, but connect it directly to
  the socket going back to the client.
  </P>
  <P>
  While this will probably do what you want, there <EM>are</EM> some
  disadvantages to it:
  </P>
  <UL>
   <LI><STRONG>YOU</STRONG> (the script) are responsible for generating
     <STRONG>ALL</STRONG> of the HTTP headers, and no longer
     <EM>just</EM> the &quot;<SAMP>Content-type</SAMP>&quot; or
     &quot;<SAMP>Location</SAMP>&quot; headers
   </LI>
   <LI>Unless your script generates its output carefully, you will see a
    performance penalty as excessive numbers of packets go back and forth
   </LI>
  </UL>
  <P>
  As an example how you might handle the former (in a Perl script):
  </P>
  <P>
  <DL>
   <DD><CODE>if ($0 =~ m:^(.*/)*nph-[^/]*$:) {
    <BR>
    &nbsp;&nbsp;&nbsp;&nbsp;
    $HTTP_headers&nbsp;=&nbsp;
    &quot;HTTP/1.1&nbsp;200&nbsp;OK\015\012&quot;;
    <BR>
    &nbsp;&nbsp;&nbsp;&nbsp;
    $HTTP_headers&nbsp;.=&nbsp;
    &quot;Connection:&nbsp;close\015\012&quot;;
    <BR>
    &nbsp;&nbsp;&nbsp;&nbsp;
    print&nbsp;$HTTP_headers;
    <BR>
    }</CODE>
   </DD>
  </DL>
  </P>
  <P>
  and then follow with your normal non-<SAMP>nph</SAMP> headers.
  As of Apache 1.3, CGI scripts are essentially not buffered.  Every time
  your script does a "flush" to output data, that data gets relayed on to
  the client.  Some scripting languages, for example Perl, have their own
  buffering for output - this can be disabled by setting the <CODE>$!</CODE>
  special variable to 1.  Of course this does increase the overall number
  of packets being transmitted, which can result in a sense of slowness by 
  the end user.
  </P>
  <P>Note that in version 1.3, all CGI scripts will be unbuffered
  so the only difference between nph scripts and normal scripts is
  <P>Prior to 1.3, you needed to use "nph-" scripts to accomplish non-buffering.
  Today, the only difference between nph scripts and normal scripts is
  that nph scripts require the full HTTP headers to be sent.
  </P>
  <HR>