cvs commit: apache-site index.html

1999-05-13 Thread mjc
mjc 99/05/13 06:50:39

  Modified:.index.html
  Log:
  Update based on May 1999 Netcraft results (now Apache+derivatives are at 60%)
  
  Revision  ChangesPath
  1.77  +3 -3  apache-site/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apache-site/index.html,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- index.html1999/04/07 15:24:51 1.76
  +++ index.html1999/05/13 13:50:37 1.77
  @@ -90,10 +90,10 @@
   PBLOCKQUOTE
   
   Apache has been the most popular web server on the Internet since
  -April of 1996. The January 1999 WWW server A
  +April of 1996. The May 1999 WWW server A
   HREF=http://www.netcraft.com/survey/;site survey by Netcraft/A
  -found that over 53% of the web sites on the Internet are using Apache
  -(58% if Apache derivatives are included), thus making it more widely
  +found that over 57% of the web sites on the Internet are using Apache
  +(over 60% if Apache derivatives are included), thus making it more widely
   used than all other web servers combined.
   
   P
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_autoindex.c mod_include.c

1999-05-13 Thread coar
coar99/05/13 11:25:59

  Modified:htdocs/manual/mod mod_autoindex.html
   src  CHANGES
   src/modules/standard mod_autoindex.c mod_include.c
  Log:
Someone finally stood up and made the ReadmeName and HeaderName
features use subrequests.  Not only that, but they can be
parsed for SSIs too!
  
  PR:   1574, 3026, 3529, 3569, 4256
  Submitted by: Raymond S Brand [EMAIL PROTECTED]
  Reviewed by:  Ken Coar
  
  Revision  ChangesPath
  1.31  +57 -17apache-1.3/htdocs/manual/mod/mod_autoindex.html
  
  Index: mod_autoindex.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/mod_autoindex.html,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_autoindex.html1999/01/04 14:35:53 1.30
  +++ mod_autoindex.html1999/05/13 18:25:45 1.31
  @@ -426,20 +426,53 @@
   A
HREF=directive-dict.html#Module
REL=Help
  -STRONGModule:/STRONG/A mod_autoindexP
  +STRONGModule:/STRONG/A mod_autoindex
  +  BR
  +  A
  +   HREF=directive-dict.html#Compatibility
  +   REL=Help
  +  STRONGCompatibility:/STRONG/A some features only available after
  + 1.3.6; see text
   
  +P
   The HeaderName directive sets the name of the file that will be inserted
   at the top of the index listing. EMFilename/EM is the name of the file
  -to include, and is taken to be relative to the directory being indexed.
  -The server first attempts to include EMfilename/EMCODE.html/CODE
  -as an HTML document, otherwise it will include EMfilename/EM as plain
  -text. Example:
  +to include.
  +/P
  +BLOCKQUOTESTRONGApache 1.3.6 and earlier:/STRONG
  +The module first attempts to include EMfilename/EMCODE.html/CODE
  +as an HTML document, otherwise it will try to include EMfilename/EM as
  +plain text.  EMFilename/EM is treated as a filesystem path relative
  +to the directory being indexed.  In no case is SSI processing done.
  +Example:
   BLOCKQUOTECODEHeaderName HEADER/CODE/BLOCKQUOTE
   when indexing the directory CODE/web/CODE, the server will first look for
   the HTML file CODE/web/HEADER.html/CODE and include it if found, 
otherwise
   it will include the plain text file CODE/web/HEADER/CODE, if it exists.
  -
  -PSee also A HREF=#readmenameReadmeName/A.PHR
  +/BLOCKQUOTE
  +BLOCKQUOTESTRONGApache versions after 1.3.6:/STRONG
  +EMFilename/EM is treated as a URI path relative to the one used
  +to access the directory being indexed, and must resolve to a document
  +with a major content type of SAMPtext/SAMP (EMe.g./EM,
  +SAMPtext/html/SAMP, SAMPtext/plain/SAMP, EMetc./EM).
  +This means that EMfilename/EM may refer to a CGI script if the
  +script's actual file type (as opposed to its output) is marked as
  +SAMPtext/html/SAMP such as with a directive like:
  +PRE
  +AddType text/html .cgi
  +/PRE
  +A HREF=../content-negotiation.htmlContent negotiation/A
  +will be performed if the SAMPMultiViews/SAMP
  +A HREF=core.html#optionsoption/A is enabled.
  +If EMfilename/EM resolves to a static SAMPtext/html/SAMP document
  +(not a CGI script) and the
  +SAMPIncludes/SAMP A HREF=core.html#optionsoption/A is enabled,
  +the file will be processed for server-side includes (see the
  +A HREF=mod_include.htmlSAMPmod_include/SAMP/A documentation).
  +/BLOCKQUOTE
  +P
  +See also A HREF=#readmenameReadmeName/A.
  +PHR
   
   H2A NAME=indexignoreIndexIgnore/A/H2
   !--%plaintext lt;?INDEX {\tt IndexIgnore} directivegt; --
  @@ -753,19 +786,26 @@
   A
HREF=directive-dict.html#Module
REL=Help
  -STRONGModule:/STRONG/A mod_autoindexP
  +STRONGModule:/STRONG/A mod_autoindex
  +  BR
  +  A
  +   HREF=directive-dict.html#Compatibility
  +   REL=Help
  +  STRONGCompatibility:/STRONG/A some features only available after
  + 1.3.6; see text
   
  +P
   The ReadmeName directive sets the name of the file that will be appended
   to the end of the index listing. EMFilename/EM is the name of the file
  -to include, and is taken to be relative to the directory being indexed.
  -The server first attempts to include EMfilename/EMCODE.html/CODE
  -as an HTML document, otherwise it will include EMfilename/EM as plain
  -text. Example:
  -BLOCKQUOTECODEReadmeName README/CODE/BLOCKQUOTE
  -when indexing the directory CODE/web/CODE, the server will first look for
  -the HTML file CODE/web/README.html/CODE and include it if found, 
otherwise
  -it will include the plain text file CODE/web/README/CODE, if it exists.
  -
  +to include, and is taken to be relative to the location being indexed.
  +/P
  +BLOCKQUOTE
  +STRONGThe EMfilename/EM argument is treated as a stub filename
  +in Apache 1.3.6 and earlier, and as a relative URI in later versions.
  +Details of how it is handled may be found under the description of
  +the A HREF=#headernameHeaderName/A directive, which uses the
  +same mechanism and changed at the same time as ReadmeName./STRONG
  

cvs commit: apache-apr/docs fileio.txt

1999-05-13 Thread rbb
rbb 99/05/13 11:38:06

  Modified:apr/file_io/unix dir.c
   apr/test testfile.c
   include  apr_errno.h apr_file_io.h
   docs fileio.txt
  Log:
  The directory chagnes discussed on new-httpd are finally done.
  
  Revision  ChangesPath
  1.6   +84 -3 apache-apr/apr/file_io/unix/dir.c
  
  Index: dir.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- dir.c 1999/05/12 19:15:29 1.5
  +++ dir.c 1999/05/13 18:38:02 1.6
  @@ -56,12 +56,15 @@
   #include errno.h
   #include string.h
   #include dirent.h
  +#include sys/stat.h
   #include fileio.h
   #include apr_file_io.h
  +#include apr_lib.h
   
  -ap_status_t dir_cleanup(struct dir_t *thedir)
  +ap_status_t dir_cleanup(void *thedir)
   {
  -if (closedir(thedir-dirstruct) == 0) {
  +struct dir_t *dir = thedir;
  +if (closedir(dir-dirstruct) == 0) {
   return APR_SUCCESS;
   }
   else {
  @@ -75,6 +78,7 @@
   
   thedir-dirname = strdup(dirname);
   thedir-dirstruct = opendir(dirname);
  +thedir-entry = NULL;
   
   if (thedir-dirstruct == NULL) {
   free(thedir);
  @@ -82,7 +86,6 @@
   }
   else {
   ap_register_cleanup(cont-pool, (void *)thedir, dir_cleanup, NULL);
  -thedir-entry = NULL;
   return thedir;
   }
   }
  @@ -132,4 +135,82 @@
   }
   }
   
  +ap_ssize_t ap_dir_entry_size(ap_context_t *context, ap_dir_t *thedir)
  +{
  +struct stat filestat;
  +char *fname = NULL;
  +
  +if (thedir-entry == NULL) {
  +errno = ENOFILE;
  +return -1;
  +}
  +fname = ap_pstrcat(context-pool, thedir-dirname, /, 
  +   thedir-entry-d_name, NULL);
  +if (stat(fname, filestat) == -1) {
  +errno = ENOSTAT;
  +return -1;
  +}
  +
  +return filestat.st_size;
  +}
  +
  +time_t ap_dir_entry_mtime(ap_context_t *context, ap_dir_t *thedir)
  +{
  +struct stat filestat;
  +char *fname = NULL;
  +
  +if (thedir-entry == NULL) {
  +errno = ENOFILE;
  +return -1;
  +}
  +
  +fname = ap_pstrcat(context-pool, thedir-dirname, /, 
  +   thedir-entry-d_name, NULL);
  +if (stat(fname, filestat) == -1) {
  +errno = ENOSTAT;
  +return -1;
  +}
  +
  +return filestat.st_mtime;
  +}
  + 
  +ap_filetype_e ap_dir_entry_ftype(ap_context_t *context, ap_dir_t *thedir)
  +{
  +struct stat filestat;
  +char *fname = NULL;
  +
  +if (thedir-entry == NULL) {
  +errno = ENOFILE;
  +return -1;
  +}
  +
  +fname = ap_pstrcat(context-pool, thedir-dirname, /, 
  +   thedir-entry-d_name, NULL);
  +if (stat(fname, filestat) == -1) {
  +errno = ENOSTAT;
  +return -1;
  +}
  +
  +if (S_ISREG(filestat.st_mode))
  +return APR_REG;
  +if (S_ISDIR(filestat.st_mode))
  +return APR_DIR;
  +if (S_ISCHR(filestat.st_mode))
  +return APR_CHR;
  +if (S_ISBLK(filestat.st_mode))
  +return APR_BLK;
  +if (S_ISFIFO(filestat.st_mode))
  +return APR_PIPE;
  +if (S_ISLNK(filestat.st_mode))
  +return APR_LNK;
  +if (S_ISSOCK(filestat.st_mode))
  +return APR_SOCK;
  +}
  +
  +char * ap_get_dir_filename(ap_context_t * context, ap_dir_t *thedir)
  +{
  +char *name = (char *)ap_palloc(context-pool, 
strlen(thedir-entry-d_name));
  +name = ap_pstrdup(context-pool, thedir-entry-d_name);
  +return name;
  +}
   
  
  
  
  1.17  +35 -2 apache-apr/apr/test/testfile.c
  
  Index: testfile.c
  ===
  RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- testfile.c1999/05/13 13:06:51 1.16
  +++ testfile.c1999/05/13 18:38:04 1.17
  @@ -208,6 +208,9 @@
   int testdirs(ap_context_t *context)
   {
   ap_dir_t *temp;  
  +ap_file_t *file;
  +ap_ssize_t bytes;
  +char *fname;
   
   fprintf(stdout, Testing Directory functions.\n);
   
  @@ -220,10 +223,12 @@
   fprintf(stdout, OK\n);
   }
   
  -if (ap_open(context, testdir/testfile, APR_READ | APR_WRITE | 
APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE) == NULL) {;
  +if ((file = ap_open(context, testdir/testfile, APR_READ | APR_WRITE | 
APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE)) == NULL) {;
   return -1;
   }
   
  +bytes = ap_write(context, file, Another test!!, strlen(Another 
test!!)); 
  +
   fprintf(stdout, \tOpening Directory...);
   if ((temp = ap_opendir(context, testdir)) == NULL) {
   fprintf(stderr, Could not open 

cvs commit: apache-1.3/src/modules/standard mod_include.c mod_autoindex.c

1999-05-13 Thread dgaudet
dgaudet 99/05/13 12:00:48

  Modified:src/modules/standard mod_include.c mod_autoindex.c
  Log:
  Back out the evil hack portion of Raymond's patch.  In addition to being
  an evil hack, it causes memory corruption.  You cannot destroy a #included
  subrequest of mod_include... look for all uses of request_config in
  mod_include, in particular look at the code around the ap_join_pool call.
  
  Revision  ChangesPath
  1.116 +9 -40 apache-1.3/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_include.c,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- mod_include.c 1999/05/13 18:25:57 1.115
  +++ mod_include.c 1999/05/13 19:00:41 1.116
  @@ -108,6 +108,9 @@
   
   module MODULE_VAR_EXPORT includes_module;
   
  +/* just need some arbitrary non-NULL pointer which can't also be a 
request_rec */
  +#define NESTED_INCLUDE_MAGIC (includes_module)
  +
   /*  Environment function -- 
*/
   
   /* XXX: could use ap_table_overlap here */
  @@ -743,7 +746,9 @@
   }
   
/* destroy the sub request if it's not a nested include */
  - if (rr != NULL) {
  +if (rr != NULL
  +  ap_get_module_config(rr-request_config, includes_module)
  + != NESTED_INCLUDE_MAGIC) {
ap_destroy_sub_req(rr);
   }
   }
  @@ -2371,41 +2376,6 @@
   return OK;
   }
   
  -#define SUB_REQ_STRING   Sub request to mod_include
  -#define PARENT_STRINGParent request to mod_include
  -
  -if (ap_table_get(r-notes, SUB_REQ_STRING) != NULL) {
  - request_rec *p = r-main;
  -
  - /*
  -  * The note is a flag to mod_include that this request is actually
  -  * a subrequest from another module and that mod_include needs to
  -  * treat it as if it's a subrequest from mod_include.
  -  *
  -  * HACK ALERT!
  -  * There is no good way to pass the parent request_rec to mod_include.
  -  * Tables only take string values and there is nowhere appropriate in
  -  * in the request_rec that can safely be used.
  -  *
  -  * So we search up the chain of requests and redirects looking for
  -  * the parent request.
  -  */
  -
  - while (p) {
  - if (ap_table_get(p-notes, PARENT_STRING) != NULL) {
  - /* Kludge --- See below */
  - ap_set_module_config(r-request_config, includes_module, p);
  -
  - ap_add_common_vars(p);
  - ap_add_cgi_vars(p);
  - add_include_vars(p, DEFAULT_TIME_FORMAT);
  - ap_table_unset(r-notes, SUB_REQ_STRING);
  - break;
  - }
  - p = (p-prev) ? p-prev : p-main;
  - }
  -}
  -
   if ((parent = ap_get_module_config(r-request_config, 
includes_module))) {
/* Kludge --- for nested includes, we want to keep the subprocess
 * environment of the base document (for compatibility); that means
  @@ -2441,10 +2411,9 @@
   send_parsed_content(f, r);
   
   if (parent) {
  - /* Kludge --- Doing this allows the caller to safely destroy the
  -  * sub_req
  -  */
  - r-pool = ap_make_sub_pool(r-pool);
  + /* signify that the sub request should not be killed */
  + ap_set_module_config(r-request_config, includes_module,
  + NESTED_INCLUDE_MAGIC);
   }
   
   ap_kill_timeout(r);
  
  
  
  1.108 +0 -8  apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- mod_autoindex.c   1999/05/13 18:25:56 1.107
  +++ mod_autoindex.c   1999/05/13 19:00:43 1.108
  @@ -924,10 +924,6 @@
   ap_rputs(/PRE\n, r);
   }
   
  -/* See mod_include */
  -#define SUB_REQ_STRING   Sub request to mod_include
  -#define PARENT_STRINGParent request to mod_include
  -
   /*
* Handle the preamble through the H1 tag line, inclusive.  Locate
* the file with a subrequests.  Process text/html documents by actually
  @@ -969,8 +965,6 @@
if (! suppress_amble) {
emit_preamble(r, title);
}
  - ap_table_add(r-notes, PARENT_STRING, );
  - ap_table_add(rr-notes, SUB_REQ_STRING, );
/*
 * If there's a problem running the subrequest, display the
 * preamble if we didn't do it before -- the header file
  @@ -1045,8 +1039,6 @@
 */
if (rr-content_type != NULL) {
if (!strcasecmp(text/html, rr-content_type)) {
  - 

cvs commit: apache-1.3/src/include alloc.h

1999-05-13 Thread dgaudet
dgaudet 99/05/13 12:44:15

  Modified:src/include alloc.h
  Log:
  add a bunch more info to the pool/ancestor documentation... Raymond's
  comments made it clear to me that what I'd written wasn't so clear ;)
  
  Revision  ChangesPath
  1.68  +36 -2 apache-1.3/src/include/alloc.h
  
  Index: alloc.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/alloc.h,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- alloc.h   1999/03/07 14:05:33 1.67
  +++ alloc.h   1999/05/13 19:44:14 1.68
  @@ -95,8 +95,42 @@
   API_EXPORT(pool *) ap_make_sub_pool(pool *); /* All pools are subpools of 
permanent_pool */
   API_EXPORT(void) ap_destroy_pool(pool *);
   
  -/* used to guarantee to the pool debugging code that the sub pool will not be
  - * destroyed before the parent pool
  +/* pools have nested lifetimes -- sub_pools are destroyed when the
  + * parent pool is cleared.  We allow certain liberties with operations
  + * on things such as tables (and on other structures in a more general
  + * sense) where we allow the caller to insert values into a table which
  + * were not allocated from the table's pool.  The table's data will
  + * remain valid as long as all the pools from which its values are
  + * allocated remain valid.
  + *
  + * For example, if B is a sub pool of A, and you build a table T in
  + * pool B, then it's safe to insert data allocated in A or B into T
  + * (because B lives at most as long as A does, and T is destroyed when
  + * B is cleared/destroyed).  On the other hand, if S is a table in
  + * pool A, it is safe to insert data allocated in A into S, but it
  + * is *not safe* to insert data allocated from B into S... because
  + * B can be cleared/destroyed before A is (which would leave dangling
  + * pointers in T's data structures).
  + *
  + * In general we say that it is safe to insert data into a table T
  + * if the data is allocated in any ancestor of T's pool.  This is the
  + * basis on which the POOL_DEBUG code works -- it tests these ancestor
  + * relationships for all data inserted into tables.  POOL_DEBUG also
  + * provides tools (ap_find_pool, and ap_pool_is_ancestor) for other
  + * folks to implement similar restrictions for their own data
  + * structures.
  + *
  + * However, sometimes this ancestor requirement is inconvenient --
  + * sometimes we're forced to create a sub pool (such as through
  + * ap_sub_req_lookup_uri), and the sub pool is guaranteed to have
  + * the same lifetime as the parent pool.  This is a guarantee implemented
  + * by the *caller*, not by the pool code.  That is, the caller guarantees
  + * they won't destroy the sub pool individually prior to destroying the
  + * parent pool.
  + *
  + * In this case the caller must call ap_pool_join() to indicate this
  + * guarantee to the POOL_DEBUG code.  There are a few examples spread
  + * through the standard modules.
*/
   #ifndef POOL_DEBUG
   #ifdef ap_pool_join