cvs commit: apache/src/modules/example mod_example.c

1997-04-18 Thread Rodent of Unusual Size
coar97/04/18 11:50:50

  Modified:src/modules/example  mod_example.c
  Log:
Change the way in which memory for the trace information is
being allocated; different pools are used for different phases,
and data from previous phases were turning to unrecoverable
sludge in various pools.
  
  Reviewed by:  Ron
  
  Revision  ChangesPath
  1.7   +51 -20apache/src/modules/example/mod_example.c
  
  Index: mod_example.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/example/mod_example.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -C3 -r1.6 -r1.7
  *** mod_example.c 1997/04/16 05:47:58 1.6
  --- mod_example.c 1997/04/18 18:50:48 1.7
  ***
  *** 104,109 
  --- 104,118 
static char *trace = NULL;

/*
  +  * To avoid leaking memory from pools other than the per-request one, we
  +  * allocate a module-private pool, and then use a sub-pool of that which 
gets
  +  * freed each time we modify the trace.  That way previous layers of trace
  +  * data don't get lost.
  +  */
  + static pool *example_pool = NULL;
  + static pool *example_subpool = NULL;
  + 
  + /*
 * Declare ourselves so the configuration routines can find and know us.
 * We'll fill it in at the end of the module.
 */
  ***
  *** 260,272 
 * be displayed by the example_handler() routine.
 */
static void trace_add
  ! (server_rec *s, pool *p, example_config *mconfig, const char *note) {

char*sofar;
char*addon;
char*where;

/*
 * If we weren't passed a configuration record, we can't figure out to
 * what location this call applies.  This only happens for co-routines
 * that don't operate in a particular directory or server context.  If 
we
  --- 269,297 
 * be displayed by the example_handler() routine.
 */
static void trace_add
  ! (server_rec *s, example_config *mconfig, const char *note) {

char*sofar;
char*addon;
char*where;
  + pool*subpool;

/*
  +  * Make a new sub-pool and copy any existing trace to it.
  +  */
  + subpool = make_sub_pool (example_pool);
  + if (trace != NULL) {
  + addon = pstrcat (subpool, trace, NULL);
  + }
  + /*
  +  * Now, if we have a sub-pool from before, nuke it and replace with the
  +  * one we just allocated.
  +  */
  + if (example_subpool != NULL) {
  + destroy_pool (example_subpool);
  + }
  + example_subpool = subpool;
  + /*
 * If we weren't passed a configuration record, we can't figure out to
 * what location this call applies.  This only happens for co-routines
 * that don't operate in a particular directory or server context.  If 
we
  ***
  *** 277,283 
where = (where != NULL) ? where : ;
addon = pstrcat 
(
  ! p,
   DTSAMP,
note,
/SAMP\n   /DT\n,
  --- 302,308 
where = (where != NULL) ? where : ;
addon = pstrcat 
(
  ! subpool,
   DTSAMP,
note,
/SAMP\n   /DT\n,
  ***
  *** 287,300 
NULL
);
sofar = (trace == NULL) ?  : trace;
  ! trace = pstrcat (p, sofar, addon, NULL);
/*
 * Store a copy of the same information in the configuration record, if
 * there is one.
 */
if (mconfig != NULL) {
sofar = (mconfig-trace == NULL) ?  : mconfig-trace;
  ! mconfig-trace = pstrcat (p, sofar, addon, NULL);
}
/*
 * You *could* uncomment the following if you wanted to see the calling
  --- 312,325 
NULL
);
sofar = (trace == NULL) ?  : trace;
  ! trace = pstrcat (subpool, sofar, addon, NULL);
/*
 * Store a copy of the same information in the configuration record, if
 * there is one.
 */
if (mconfig != NULL) {
sofar = (mconfig-trace == NULL) ?  : mconfig-trace;
  ! mconfig-trace = pstrcat (subpool, sofar, addon, NULL);
}
/*
 * You *could* uncomment the following if you wanted to see the calling
  ***
  *** 304,310 
 */
/*
if (s != NULL) {
  ! log_printf(s, mod_example: %s, note);
}
 */
}
  --- 329,335 
 */
/*
if (s != NULL) {
  ! log_printf (s, mod_example: %s, note);
}
 */
}
  ***
  *** 336,342 
 * Example Wuz Here
 */
cfg-local = 1;
  ! trace_add (cmd-server, cmd-pool, cfg, cmd_example());
return NULL;

cvs commit: apache/htdocs/manual/misc FAQ.html

1997-04-18 Thread Paul Sutton
pcs 97/04/18 13:42:20

  Modified:htdocs/manual/misc  FAQ.html
  Log:
  Two cookies questions
  
  Revision  ChangesPath
  1.25  +58 -1 apache/htdocs/manual/misc/FAQ.html
  
  Index: FAQ.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/misc/FAQ.html,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -C3 -r1.24 -r1.25
  *** FAQ.html  1997/04/15 21:17:46 1.24
  --- FAQ.html  1997/04/18 20:42:19 1.25
  ***
  *** 8,14 
!--#include virtual=header.html --
H1Apache Server Frequently Asked Questions/H1
P
  ! $Revision: 1.24 $ ($Date: 1997/04/15 21:17:46 $)
/P
P
Throughout the text of this FAQ you may find numbers enclosed in
  --- 8,14 
!--#include virtual=header.html --
H1Apache Server Frequently Asked Questions/H1
P
  ! $Revision: 1.25 $ ($Date: 1997/04/18 20:42:19 $)
/P
P
Throughout the text of this FAQ you may find numbers enclosed in
  ***
  *** 95,100 
  --- 95,105 
   LIA HREF=#setgidWhy do I get quot;setgid: Invalid
argumentquot; at startup?/A
   /LI
  +LIA HREF=#cookies1Why does Apache send a cookie on every 
response?/A
  +/LI
  +LIA HREF=#cookies2Why don't my cookies work, I even compiled in 
  + mod_cookies?/A
  +/LI
  /OL
 /LI
 LIA
  ***
  *** 760,765 
  --- 765,805 
  /P
  HR
 /LI
  +  LIA NAME=cookies1
  +   STRONGWhy does Apache send a cookie on every response?/STRONG/A
  +   P
  +Apache does inot/i send automatically send a cookie on every
  +response, unless you have re-compiled it with the 
  +   A
  + HREF=../mod/mod_cookiesmod_cookies/AA 
  + HREF=#References[22]/A/SAMP 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 mod_cookies, do not compile
  +it into Apache. Note that in 1.2 this module was renamed to the
  +more correct name 
  +   A
  + HREF=../mod/mod_usertrackmod_usertrack/AA 
  + HREF=#References[23]/A/SAMP, and cookies 
  +have to be specifically enabled with the SAMP
  +   A
  + HREF=../mod/mod_usertrack#cookietrackingCookieTracking/AA 
  + HREF=#References[24]/A/SAMP
  +directive.
  +   /P
  +   HR
  +  /LI
  +  LIA NAME=cookies2
  +   STRONGWhy don't my cookies work, I even compiled in mod_cookies?
  +   /STRONG/A
  +P
  + Firstly, you do inot/i need to compile in mod_cookies in order
  + for your scripts to work (see A HREF=#cookies1this question/A
  + for more about mod_cookies). Apache passes on your Set-Cookie header
  + fine, with or without this module. If cookies do not work it will
  + be because your script does not work properly or your browser does
  + not use cookies or is not set-up to accept them.
  +   /LI
/OL
 HR
 A NAME=References
  ***
  *** 893,898 
  --- 933,955 
   DDA
HREF=http://www.apache.org/docs/mod/core.html#group;
   http://www.apache.org/docs/mod/core.html#group/A
  +DT[22]
  +/DT
  +DDA
  + HREF=http://www.apache.org/docs/mod/mod_cookies;
  +http://www.apache.org/docs/mod/mod_cookies/A
  +/DD
  +DT[23]
  +/DT
  +DDA
  + HREF=http://www.apache.org/docs/mod/mod_usertrack;
  +http://www.apache.org/docs/mod/mod_usertrack/A
  +/DD
  +DT[24]
  +/DT
  +DDA
  + HREF=http://www.apache.org/docs/mod/mod_usertrack#cookietracking;
  +http://www.apache.org/docs/mod/mod_usertrack#cookietracking/A
   /DD
  /DL
!--#include virtual=footer.html --
  
  
  


cvs commit: apache/htdocs/manual new_features_1_2.html

1997-04-18 Thread Paul Sutton
pcs 97/04/18 14:45:58

  Modified:htdocs/manual  new_features_1_2.html
  Log:
  Remove to be documented on vhost enhancements. Mention _default_ as a
  new feature.
  
  Revision  ChangesPath
  1.26  +4 -4  apache/htdocs/manual/new_features_1_2.html
  
  Index: new_features_1_2.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/new_features_1_2.html,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -C3 -r1.25 -r1.26
  *** new_features_1_2.html 1997/02/20 10:40:25 1.25
  --- new_features_1_2.html 1997/04/18 21:45:57 1.26
  ***
  *** 109,120 
the cookie module is compiled in. Also, an expiry time can be set
on the cookies.

  ! libxa href=multi_ip.htmlMultiple IPs in
  ! lt;VirtualHostgt;/a/b
  ! [Documentation to be written]br
The lt;VirtualHostgt; directive can now take more than one IP
address or hostname. This lets a single vhost handles requests
  ! for multiple IPs or hostnames.

liba href=mod/mod_cgi.html#cgi_debugCGI Debugging 
Environment/a/bbr
codeScriptLog/code allows you to now set up a log that records
  --- 109,120 
the cookie module is compiled in. Also, an expiry time can be set
on the cookies.

  ! liba href=mod/core.html#virtualhostlt;VirtualHostgt; 
Enhancements/a/bbr
The lt;VirtualHostgt; directive can now take more than one IP
address or hostname. This lets a single vhost handles requests
  ! for multiple IPs or hostnames. Also the special section
  ! lt;VirtualHost _default_gt; can be used to handle requests normally
  ! left for the main server configuration.

liba href=mod/mod_cgi.html#cgi_debugCGI Debugging 
Environment/a/bbr
codeScriptLog/code allows you to now set up a log that records
  
  
  


cvs commit: apache/htdocs/manual/mod core.html

1997-04-18 Thread Paul Sutton
pcs 97/04/18 14:55:12

  Modified:htdocs/manual/mod  core.html
  Log:
  Explain Satisfy directive.
  
  Revision  ChangesPath
  1.47  +12 -2 apache/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/core.html,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -C3 -r1.46 -r1.47
  *** core.html 1997/04/16 09:09:34 1.46
  --- core.html 1997/04/18 21:55:11 1.47
  ***
  *** 1060,1071 
A name=satisfyh2Satisfy/h2/A
!--%plaintext lt;?INDEX {\tt Satisfy} directivegt; --
strongSyntax:/strong Satisfy em'any' or 'all'/embr
strongContext:/strong server config, virtual host, directory, 
.htaccessbr
strongStatus:/strong corebr
strongCompatibility:/strong Satisfy is only available in Apache 1.2 and 
laterp

  ! Access policy if both allow and require used. The parameter can be either
  ! em'all'/em or em'any'/em.

phr

  --- 1060,1081 
A name=satisfyh2Satisfy/h2/A
!--%plaintext lt;?INDEX {\tt Satisfy} directivegt; --
strongSyntax:/strong Satisfy em'any' or 'all'/embr
  + strongDefault:/strong Satisy allbr
strongContext:/strong server config, virtual host, directory, 
.htaccessbr
strongStatus:/strong corebr
strongCompatibility:/strong Satisfy is only available in Apache 1.2 and 
laterp

  ! Access policy if both allow and require used. The parameter can be
  ! either em'all'/em or em'any'/em. This directive is only useful
  ! if access to a particular area is being restricted by both
  ! username/password iand/i client host address. In this case the
  ! default behavior (all) is to require that the client passes the
  ! address access restriction iand/i enters a valid username and
  ! password. With the any option the client will be granted access if
  ! they either pass the host restriction or enter a valid username and
  ! password. This can be used to password restrict an area, but to let
  ! clients from particular addresses in without prompting for a password.
  ! 

phr

  
  
  


cvs commit: apache/htdocs/manual/mod mod_include.html

1997-04-18 Thread Paul Sutton
pcs 97/04/18 15:13:51

  Modified:htdocs/manual/mod  mod_include.html
  Log:
  Provide information on enabling SSI files. Document how to enable
  SSI using a handler name, and relegate the magic mime types to back-compat.
  status.
  
  Revision  ChangesPath
  1.7   +28 -5 apache/htdocs/manual/mod/mod_include.html
  
  Index: mod_include.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_include.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -C3 -r1.6 -r1.7
  *** mod_include.html  1997/02/12 04:37:35 1.6
  --- mod_include.html  1997/04/18 22:13:50 1.7
  ***
  *** 10,23 

This module is contained in the codemod_include.c/code file, and
is compiled in by default. It provides for server-parsed html
  ! documents, known as SPML documents.  Any document with mime type
  ! codetext/x-server-parsed-html/code or
  ! codetext/x-server-parsed-html3/code will be parsed by this module,
  ! with the resulting output given the mime type codetext/html/code.
  ! Several directives beyond the original NCSA SPML definition have been
included in Apache 1.2 - these are flagged below with the phrase
Apache 1.2 and above.  Of particular significance are the new flow 
control directives documented at the bottom.

h2Basic Elements/h2

  --- 10,46 

This module is contained in the codemod_include.c/code file, and
is compiled in by default. It provides for server-parsed html
  ! documents. Several directives beyond the original NCSA definition have been
included in Apache 1.2 - these are flagged below with the phrase
Apache 1.2 and above.  Of particular significance are the new flow 
control directives documented at the bottom.
  + 
  + H2Enabling Server-Side Includes/H2
  + 
  + Any document with handler of server-parsed will be parsed by this
  + module, if the CODEIncludes/CODE option is set. If documents
  + containing server-side include directives are given the extension
  + .shtml, the following directives will make Apache parse them and
  + assign the resulting document the mime type of CODEtext/html/CODE:
  + 
  + PRE
  + AddType text/html .shtml
  + AddHandler server-parsed .shtml
  + /PRE
  + 
  + The following directive must be given for the directories containing
  + the shtml files (typically in a CODElt;Directorygt;/CODE section,
  + but this directive is also valid .htaccess files if CODEAllowOverride
  + Options/CODE is set):
  + 
  + PRE
  + Options +Includes
  + /PRE
  + 
  + For backwards compatibility, documents with mime type
  + codetext/x-server-parsed-html/code or
  + codetext/x-server-parsed-html3/code will also be parsed
  + (and the resulting output given the mime type codetext/html/code).

h2Basic Elements/h2

  
  
  


cvs commit: apache/htdocs/manual/mod mod_include.html

1997-04-18 Thread Paul Sutton
pcs 97/04/18 15:19:59

  Modified:htdocs/manual/mod  mod_include.html
  Log:
  Forgot to mention XBitHack as a method of enabling SSI. Update
  docs for this directive to state it only applies to text/html files.
  
  Revision  ChangesPath
  1.8   +6 -0  apache/htdocs/manual/mod/mod_include.html
  
  Index: mod_include.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_include.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -C3 -r1.7 -r1.8
  *** mod_include.html  1997/04/18 22:13:50 1.7
  --- mod_include.html  1997/04/18 22:19:58 1.8
  ***
  *** 37,42 
  --- 37,46 
Options +Includes
/PRE

  + Alternatively the A HREF=#xbithackCODEXBitHack/CODE/A
  + directive can be used to parse normal (CODEtext/html/CODE) files,
  + based on file permissions.  P
  + 
For backwards compatibility, documents with mime type
codetext/x-server-parsed-html/code or
codetext/x-server-parsed-html3/code will also be parsed
  ***
  *** 316,321 
  --- 320,327 
strongModule:/strong mod_includep

The XBitHack directives controls the parsing of ordinary html documents.
  + This directive only affects files associated with the MIME type
  + CODEtext/html/CODE. 
emStatus/em can have the following values:
dl
dtoff