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

1998-02-12 Thread dgaudet
dgaudet 98/02/11 17:09:47

  Modified:src  CHANGES
   src/modules/standard mod_autoindex.c mod_mime.c
mod_negotiation.c
  Log:
  Old clients really don't want to see Content-Encoding: gzip.  So now we
  preserve the encoding given by the AddEncoding directive.  This allows us,
  for example, to move forward with things like AddEncoding deflate .df,
  while preserving backwards brokenness with AddEncoding x-gzip .gz.
  
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.626 +4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.625
  retrieving revision 1.626
  diff -u -r1.625 -r1.626
  --- CHANGES   1998/02/09 13:25:40 1.625
  +++ CHANGES   1998/02/12 01:09:41 1.626
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b5
   
  +  *) Preserve the content encoding given by the AddEncoding directive
  + when the client doesn't otherwise specify an encoding.
  + [Ronald Tschalaer [EMAIL PROTECTED]]
  +
 *) WIN32: Append a '.' to extensionless executables in spawn[lv]e*
replacements, which makes them work.
[Sam Robb [EMAIL PROTECTED], Ben Laurie]
  
  
  
  1.67  +0 -6  apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- mod_autoindex.c   1998/02/06 09:11:39 1.66
  +++ mod_autoindex.c   1998/02/12 01:09:44 1.67
  @@ -178,9 +178,6 @@
to = ^^DIRECTORY^^;
   if (cmd-info == BY_ENCODING) {
str_tolower(to);
  - if (to[0] == 'x'  to[1] == '-') {
  - to += 2;
  - }
   }
   
   push_item(((autoindex_config_rec *) d)-alt_list, cmd-info, to, 
cmd-path, alt);
  @@ -207,9 +204,6 @@
to = ^^DIRECTORY^^;
   if (cmd-info == BY_ENCODING) {
str_tolower(to);
  - if (to[0] == 'x'  to[1] == '-') {
  - to += 2;
  - }
   }
   
   push_item(((autoindex_config_rec *) d)-icon_list, cmd-info, to, 
cmd-path,
  
  
  
  1.31  +0 -2  apache-1.3/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_mime.c1998/02/06 09:11:39 1.30
  +++ mod_mime.c1998/02/12 01:09:44 1.31
  @@ -127,8 +127,6 @@
   {
   if (*ext == '.')
   ++ext;
  -if ((enc[0] == 'x' || enc[0] == 'X')  enc[1] == '-')
  -enc += 2;
   table_set(m-encoding_types, ext, enc);
   return NULL;
   }
  
  
  
  1.70  +16 -6 apache-1.3/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- mod_negotiation.c 1998/02/10 05:54:02 1.69
  +++ mod_negotiation.c 1998/02/12 01:09:45 1.70
  @@ -1463,6 +1463,7 @@
   int i;
   accept_rec *accept_recs = (accept_rec *) neg-accept_encodings-elts;
   char *enc = variant-content_encoding;
  +char *x_enc = NULL;
   
   if (!enc || is_identity_encoding(enc)) {
   return;
  @@ -1479,19 +1480,28 @@
   
   /* Go through each of the encodings on the Accept-Encoding: header,
* looking for a match with our encoding
  - */
  + * Prefer non- 'x-' prefixed token (e.g. gzip over x-gzip) */
  +if (enc[0] == 'x'  enc[1] == '-') {
  +enc += 2;
  +}
   for (i = 0; i  neg-accept_encodings-nelts; ++i) {
   char *name = accept_recs[i].type_name;
  -int off = 0;
  -
  - if (name[0] == 'x'  name[1] == '-')
  -off = 2;
   
  -if (!strcmp(name+off, enc)) {
  +if (!strcmp(name, enc)) {
   variant-encoding_quality = 1;
   variant-content_encoding = name;
   return;
   }
  +
  +if (name[0] == 'x'  name[1] == '-'  !strcmp(name+2, enc)) {
  +x_enc = name;
  +}
  +}
  +
  +if (x_enc != NULL) {
  +variant-encoding_quality = 1;
  +variant-content_encoding = x_enc;
  +return;
   }
   
   /* Encoding not found on Accept-Encoding: header, so it is
  
  
  


cvs commit: apache-1.3/htdocs/manual/mod mod_mime.html

1998-02-12 Thread dgaudet
dgaudet 98/02/11 17:14:37

  Modified:htdocs/manual/mod mod_mime.html
  Log:
  doc the addencoding mess
  
  Revision  ChangesPath
  1.19  +15 -1 apache-1.3/htdocs/manual/mod/mod_mime.html
  
  Index: mod_mime.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_mime.html,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_mime.html 1998/02/05 20:04:56 1.18
  +++ mod_mime.html 1998/02/12 01:14:36 1.19
  @@ -117,7 +117,21 @@
   /CODE/BLOCKQUOTE
   
   This will cause files ending in .gz to be marked as encoded using the x-gzip
  -encoding, and .Z files to be marked as encoded with x-compress.PHR
  +encoding, and .Z files to be marked as encoded with x-compress.P
  +
  +Old clients expect codex-gzip/code and codex-compress/code,
  +however the standard dictates that they're equivalent to codegzip/code
  +and codecompress/code respectively.  Apache does content encoding
  +comparisons by ignoring any leading codex-/code.  When responding
  +with an encoding Apache will use whatever form (i.e. codex-foo/code
  +or codefoo/code) the client requested.  If the client didn't
  +specifically request a particular form Apache will use the form given by
  +the codeAddEncoding/code directive.  To make this long story short,
  +you should always use codex-gzip/code and codex-compress/code
  +for these two specific encodings.  More recent encodings, such as
  +codedeflate/code should be specified without the codex-/code.
  +
  +PHR
   
   H2A name=addhandlerAddHandler/A/H2
   
  
  
  


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

1998-02-12 Thread dgaudet
dgaudet 98/02/11 18:18:45

  Modified:src/ap   ap_snprintf.c
   src/helpers dummy.c
   src/main fnmatch.c http_core.c
   src/modules/standard mod_autoindex.c mod_negotiation.c
  Log:
  Clean up gcc 2.8.0 -Wall warnings... so we don't have to deal with PRs
  about them.
  
  Revision  ChangesPath
  1.13  +2 -1  apache-1.3/src/ap/ap_snprintf.c
  
  Index: ap_snprintf.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/ap/ap_snprintf.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ap_snprintf.c 1998/01/07 16:45:56 1.12
  +++ ap_snprintf.c 1998/02/12 02:18:38 1.13
  @@ -426,7 +426,7 @@
return (buf);
   }
   
  -if (format == 'f')
  +if (format == 'f') {
if (decimal_point = 0) {
*s++ = '0';
if (precision  0) {
  @@ -443,6 +443,7 @@
if (precision  0 || add_dp)
*s++ = '.';
}
  +}
   else {
*s++ = *p++;
if (precision  0 || add_dp)
  
  
  
  1.4   +1 -1  apache-1.3/src/helpers/dummy.c
  
  Index: dummy.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/dummy.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dummy.c   1997/07/25 02:03:17 1.3
  +++ dummy.c   1998/02/12 02:18:39 1.4
  @@ -1,7 +1,7 @@
   /* this file is used by TestLib */
   int foo ( const char *c )
   {
  -return 0;
  +return *c;
   }
   int main(void) {
   const char *c = '\0';
  
  
  
  1.6   +6 -3  apache-1.3/src/main/fnmatch.c
  
  Index: fnmatch.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/fnmatch.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- fnmatch.c 1997/11/06 22:03:40 1.5
  +++ fnmatch.c 1998/02/12 02:18:40 1.6
  @@ -84,12 +84,15 @@
return (FNM_NOMATCH);
   
/* Optimize for pattern with * at end or before /. */
  - if (c == EOS)
  - if (flags  FNM_PATHNAME)
  + if (c == EOS) {
  + if (flags  FNM_PATHNAME) {
return (strchr(string, '/') == NULL ?
0 : FNM_NOMATCH);
  - else
  + }
  + else {
return (0);
  + }
  + }
else if (c == '/'  flags  FNM_PATHNAME) {
if ((string = strchr(string, '/')) == NULL)
return (FNM_NOMATCH);
  
  
  
  1.158 +12 -6 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- http_core.c   1998/02/08 23:15:34 1.157
  +++ http_core.c   1998/02/12 02:18:41 1.158
  @@ -690,11 +690,14 @@
   const char *err = check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
   if (err != NULL) return err;
   
  -if (!is_directory (arg))
  - if (cmd-server-is_virtual)
  +if (!is_directory (arg)) {
  + if (cmd-server-is_virtual) {
fprintf (stderr, Warning: DocumentRoot [%s] does not exist\n, 
arg);
  - else
  + }
  + else {
return DocumentRoot must be a directory;
  + }
  +}
   
   conf-document_root = arg;
   return NULL;
  @@ -1551,11 +1554,14 @@
return;
   }
   
  -if ((str = getword_conf(cmd-pool, arg)))
  - if (!strcasecmp(str, max))
  +if ((str = getword_conf(cmd-pool, arg))) {
  + if (!strcasecmp(str, max)) {
cur = limit-rlim_max;
  - else
  + }
  + else {
cur = atol(str);
  + }
  +}
   else {
aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, cmd-server,
Invalid parameters for %s, cmd-cmd-name);
  
  
  
  1.68  +8 -4  apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- mod_autoindex.c   1998/02/12 01:09:44 1.67
  +++ mod_autoindex.c   1998/02/12 02:18:43 1.68
  @@ -635,12 +635,16 @@
if ((p = ind(titlebuf[++x], '')) != -1)
titlebuf[x + p] = '\0';
/* Scan for line breaks for Tanmoy's secretary */
  - for (y = x; titlebuf[y]; y++)
  - if ((titlebuf[y] == CR) || (titlebuf[y] == LF))
  - if (y == x)
  + for (y = x; titlebuf[y]; y++) {
 

cvs commit: apache-1.3/src/regex Makefile.tmpl

1998-02-12 Thread dgaudet
dgaudet 98/02/12 02:15:30

  Modified:src  Configure Makefile.tmpl
   src/ap   Makefile.tmpl
   src/main Makefile.tmpl
   src/modules/example Makefile.tmpl
   src/modules/experimental Makefile.tmpl
   src/modules/extra Makefile.tmpl
   src/modules/proxy Makefile.tmpl
   src/modules/standard Makefile.tmpl
   src/modules/test Makefile.tmpl
   src/os/unix Makefile.tmpl
   src/regex Makefile.tmpl
  Log:
  Out of date dependencies are worse than no dependencies.  Without an
  automated rule we're unlikely to keep them up to date.  Resurrect the
  make depend which existed prior to the makefile rearrangement.  It's
  not perfect, like it lists os/unix/os.h... but that won't break anyone
  -- win32 developers don't use these dependencies.  Folks don't any
  of them to just compile the server once... and aren't hurt by listing
  a dependency that doesn't apply to their compilation environment.
  
  Revision  ChangesPath
  1.184 +1 -1  apache-1.3/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.183
  retrieving revision 1.184
  diff -u -r1.183 -r1.184
  --- Configure 1998/02/04 18:18:49 1.183
  +++ Configure 1998/02/12 10:15:15 1.184
  @@ -1090,7 +1090,7 @@
   
   default: all
   
  -all clean :: 
  +all clean depend :: 
for i in \$(MODULES); do (cd \$\$i  \$(MAKE) CC='\$(CC)' 
AUX_CFLAGS='\$(CFLAGS)' RANLIB='\$(RANLIB)' \$@) || exit 1; done
   
   EOF
  
  
  
  1.76  +8 -3  apache-1.3/src/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Makefile.tmpl,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- Makefile.tmpl 1998/02/04 13:32:26 1.75
  +++ Makefile.tmpl 1998/02/12 10:15:16 1.76
  @@ -62,12 +62,17 @@
 $(CC) -MM $(INCLUDES) $(CFLAGS) *.c  Makefile.new \
 mv Makefile.tmpl Makefile.tmpl.bak \
 mv Makefile.new Makefile.tmpl
  -
  + for i in $(SUBDIRS); do \
  + ( cd $$i  $(MAKE) CC='$(CC)' AUX_CFLAGS='$(CFLAGS)' 
RANLIB='$(RANLIB)' depend) || exit 1; \
  + done
   
   #Dependencies
   
   $(OBJS): Makefile
   
   # DO NOT REMOVE
  -modules.o: modules.c include/httpd.h include/conf.h include/alloc.h \
  - include/buff.h include/http_config.h
  +buildmark.o: buildmark.c
  +modules.o: modules.c include/httpd.h include/conf.h os/unix/os.h \
  + include/hsregex.h include/alloc.h include/buff.h include/ap.h \
  + include/http_config.h
  +tt.o: tt.c
  
  
  
  1.12  +27 -7 apache-1.3/src/ap/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-1.3/src/ap/Makefile.tmpl,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile.tmpl 1998/02/03 20:00:55 1.11
  +++ Makefile.tmpl 1998/02/12 10:15:18 1.12
  @@ -24,10 +24,30 @@
ar cr $@ $(OBJS)
$(RANLIB) $@
   
  -# dependencies
  -ap_signal.o: $(INCDIR)/httpd.h
  -ap_slack.o: $(INCDIR)/httpd.h $(INCDIR)/http_log.h
  -ap_snprintf.o: $(INCDIR)/conf.h
  -ap_strings.o: $(INCDIR)/httpd.h
  -ap_cpystrn.o: $(INCDIR)/httpd.h
  -ap_execve.o: $(INCDIR)/httpd.h $(INCDIR)/http_log.h
  +# We really don't expect end users to use this rule.  It works only with
  +# gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
  +# using it.
  +depend:
  + sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl  Makefile.new \
  +  $(CC) -MM $(INCLUDES) $(CFLAGS) *.c  Makefile.new \
  +  mv Makefile.tmpl Makefile.tmpl.bak \
  +  mv Makefile.new Makefile.tmpl
  +
  +# DO NOT REMOVE
  +ap_cpystrn.o: ap_cpystrn.c ../include/httpd.h ../include/conf.h \
  + ../os/unix/os.h ../include/hsregex.h ../include/alloc.h \
  + ../include/buff.h ../include/ap.h
  +ap_execve.o: ap_execve.c ../include/httpd.h ../include/conf.h \
  + ../os/unix/os.h ../include/hsregex.h ../include/alloc.h \
  + ../include/buff.h ../include/ap.h ../include/http_log.h
  +ap_signal.o: ap_signal.c ../include/httpd.h ../include/conf.h \
  + ../os/unix/os.h ../include/hsregex.h ../include/alloc.h \
  + ../include/buff.h ../include/ap.h
  +ap_slack.o: ap_slack.c ../include/httpd.h ../include/conf.h \
  + ../os/unix/os.h ../include/hsregex.h ../include/alloc.h \
  + ../include/buff.h ../include/ap.h ../include/http_log.h
  +ap_snprintf.o: ap_snprintf.c ../include/conf.h ../os/unix/os.h \
  + ../include/hsregex.h
  +ap_strings.o: ap_strings.c ../include/httpd.h ../include/conf.h \
  + ../os/unix/os.h ../include/hsregex.h ../include/alloc.h \
  + ../include/buff.h ../include/ap.h
  
  
  
  1.10  +88 -55

cvs commit: apache-1.3 STATUS

1998-02-12 Thread Ralf S. Engelschall
rse 98/02/12 07:24:11

  Modified:.STATUS
  Log:
  Add my available patches.
  
  Revision  ChangesPath
  1.150 +7 -6  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- STATUS1998/02/11 12:08:32 1.149
  +++ STATUS1998/02/12 15:24:10 1.150
  @@ -160,12 +160,13 @@
[EMAIL PROTECTED]
Status: Dean +1, Martin +1, Alexei -1 (shared lib concerns)
   
  -* Ralf's variant of Jay Soffian [EMAIL PROTECTED]'s patch to add
  -  case-translations to mod_rewrite in order to provide the last missing
  -  part for virtual host support without VirtualHost
  -  ``mod_rewrite/1631: support for case conversion added to mod_rewrite''
  -  [EMAIL PROTECTED]
  -  Status (for 1.3b6-dev): Ralf +1, Dean +1
  +* Ralf's [PATCH] New RewriteMap types for mod_rewrite
  +  [EMAIL PROTECTED]
  +  Status (for 1.3b6-dev): Ralf +1
  +
  +* Ralf's [PATCH] Apache as a Reverse Proxy
  +  [EMAIL PROTECTED]
  +  Status (for 1.3b6-dev): Ralf +1
   
   Concepts:
   
  
  
  


cvs commit: apache-1.3/src/main buff.c

1998-02-12 Thread dgaudet
dgaudet 98/02/12 13:13:19

  Modified:src/main buff.c
  Log:
  fix an unsigned char * / signed char * mistake.
  
  Revision  ChangesPath
  1.64  +1 -1  apache-1.3/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/buff.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- buff.c1998/02/07 10:34:43 1.63
  +++ buff.c1998/02/12 21:13:18 1.64
  @@ -428,7 +428,7 @@
   static void end_chunk(BUFF *fb)
   {
   int i;
  -char *strp;
  +unsigned char *strp;
   
   if (fb-outchunk == -1) {
/* not chunking */