httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apache-1.3/src/support httpd.exp
Date Thu, 29 Jul 1999 17:54:17 GMT
dgaudet     99/07/29 10:54:16

  Modified:    .        STATUS
               src      ApacheCore.def CHANGES
               src/include alloc.h ap_mmn.h
               src/main alloc.c
               src/modules/standard mod_headers.c mod_negotiation.c
                        mod_rewrite.c
               src/support httpd.exp
  Log:
  back out Ken's recent patch, I'm vetoing it:
  
  - it adds a new API which can only be implemented through O(n^2) methods
  - it does not solve the problem in a way which is compatible with existing
    modules
  - We went over this, and other solutions were presented.  The current
    situation is already O(n^2), so I'm not just vetoing this based on that
    -- I'm vetoing this because I don't want another O(n^2) API embedded
    into the code.  A solution which would retain more compatibility with
    existing modules would add an "table *vary" to the request_rec, and
    then modify ap_send_http_header to merge the contents of the table
    and any "Vary" entry in r->headers_out.  This can be done with a simple
    sort operation.
  
  Revision  Changes    Path
  1.728     +14 -0     apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.727
  retrieving revision 1.728
  diff -u -r1.727 -r1.728
  --- STATUS	1999/07/28 17:37:05	1.727
  +++ STATUS	1999/07/29 17:53:36	1.728
  @@ -1,5 +1,5 @@
     1.3 STATUS:
  -  Last modified at [$Date: 1999/07/28 17:37:05 $]
  +  Last modified at [$Date: 1999/07/29 17:53:36 $]
   
   Release:
   
  @@ -64,9 +64,23 @@
    mips-dec-ultrix4.4            no      Sameer Parekh
    mips-unknown-linux            yes     Lars Eilebrecht
   
  +    * The Vary header field stuff is still broken (multiple
  +      entries occur, etc.).  The result is that some browsers (AFAIK at least
  +      MSIE) are horribly confused by the responses.
  +      Status: It should be fixed before 1.3.7 went out. For details
  +              how it should be done, please look at new-httpd mailing list
  +              archive: Ken, Ralf and Roy have already found consensus in the
  +              past there.
   
   RELEASE SHOWSTOPPERS:
   
  +    * The Vary header field stuff is still broken (multiple
  +      entries occur, etc.).  The result is that some browsers (AFAIK at least
  +      MSIE) are horribly confused by the responses.
  +      Status: It should be fixed before 1.3.7 went out. For details
  +              how it should be done, please look at new-httpd mailing list
  +              archive: Ken, Ralf and Roy have already found consensus in the
  +              past there.
   
   RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
   
  
  
  
  1.16      +0 -3      apache-1.3/src/ApacheCore.def
  
  Index: ApacheCore.def
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/ApacheCore.def,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ApacheCore.def	1999/07/28 18:20:53	1.15
  +++ ApacheCore.def	1999/07/29 17:53:43	1.16
  @@ -343,7 +343,4 @@
   	ap_standalone   @337
   	ap_server_confname   @338
   	ap_sub_req_method_uri   @339
  -	ap_field_noparam   @340
  -	ap_table_merge_unique_token   @341
  -	ap_table_mergen_unique_token   @342
   
  
  
  
  1.1401    +0 -7      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1400
  retrieving revision 1.1401
  diff -u -r1.1400 -r1.1401
  --- CHANGES	1999/07/28 17:37:09	1.1400
  +++ CHANGES	1999/07/29 17:53:45	1.1401
  @@ -1,12 +1,5 @@
   Changes with Apache 1.3.7
   
  -  *) Sanitise "Vary" values by not adding duplicate keywords.  A
  -     separate routine needs to be used to do this, so any module
  -     that frobs "Vary" needs to be changed.  The standard modules
  -     have all been modified.  This solution is somewhat inelegant,
  -     but it does the job for now.  PR#4118 (better fix than before)
  -     [Ken Coar, Roy Fielding]
  -
     *) Link DSO's with "gcc -shared" instead of "ld -Bshareable" at 
        least on Linux and FreeBSD for now.  
        [Rasmus Lerdorf]
  
  
  
  1.70      +0 -4      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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- alloc.h	1999/07/28 17:37:14	1.69
  +++ alloc.h	1999/07/29 17:53:54	1.70
  @@ -225,10 +225,6 @@
   API_EXPORT(const char *) ap_table_get(const table *, const char *);
   API_EXPORT(void) ap_table_set(table *, const char *name, const char *val);
   API_EXPORT(void) ap_table_setn(table *, const char *name, const char *val);
  -API_EXPORT(void) ap_table_merge_unique_token(table *t, const char *key,
  -					     const char *val);
  -API_EXPORT(void) ap_table_mergen_unique_token(table *t, const char *key,
  -					      const char *val);
   API_EXPORT(void) ap_table_merge(table *, const char *name, const char *more_val);
   API_EXPORT(void) ap_table_mergen(table *, const char *name, const char *more_val);
   API_EXPORT(void) ap_table_unset(table *, const char *key);
  
  
  
  1.40      +1 -2      apache-1.3/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/ap_mmn.h,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- ap_mmn.h	1999/07/28 18:20:54	1.39
  +++ ap_mmn.h	1999/07/29 17:53:55	1.40
  @@ -220,7 +220,6 @@
    * 19990320.3           - add ap_regexec()
    * 19990604.4           - add ap_field_noparam()
    * 19990621.5           - add local_ip/host to conn_rec for mass-vhost
  - * 19990728.6           - add ap_table_merge[n]_unique_token
    */
   
   #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
  @@ -228,7 +227,7 @@
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
   #define MODULE_MAGIC_NUMBER_MAJOR 19990320
   #endif
  -#define MODULE_MAGIC_NUMBER_MINOR 6                     /* 0...n */
  +#define MODULE_MAGIC_NUMBER_MINOR 5                     /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR	/* backward compat */
   
   /* Useful for testing for features. */
  
  
  
  1.115     +0 -26     apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- alloc.c	1999/07/28 17:37:16	1.114
  +++ alloc.c	1999/07/29 17:53:57	1.115
  @@ -1346,32 +1346,6 @@
       }
   }
   
  -/*
  - * Merge an HTTP token into a table entry IFF it isn't already in there.
  - * (Intended primarily to avoid "Vary: host, host".)
  - */
  -API_EXPORT(void) ap_table_merge_unique_token(table *t, const char *key,
  -					     const char *val)
  -{
  -    const char *curval;
  -
  -    curval = ap_table_get(t, key);
  -    if ((curval == NULL) || (!ap_find_token(t->a.pool, curval, val))) {
  -	ap_table_merge(t, key, val);
  -    }
  -}
  -
  -API_EXPORT(void) ap_table_mergen_unique_token(table *t, const char *key,
  -					      const char *val)
  -{
  -    const char *curval;
  -
  -    curval = ap_table_get(t, key);
  -    if ((curval == NULL) || (!ap_find_token(t->a.pool, curval, val))) {
  -	ap_table_mergen(t, key, val);
  -    }
  -}
  -
   API_EXPORT(void) ap_table_merge(table *t, const char *key, const char *val)
   {
       table_entry *elts = (table_entry *) t->a.elts;
  
  
  
  1.20      +1 -11     apache-1.3/src/modules/standard/mod_headers.c
  
  Index: mod_headers.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_headers.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_headers.c	1999/07/28 17:37:18	1.19
  +++ mod_headers.c	1999/07/29 17:54:05	1.20
  @@ -213,17 +213,7 @@
               ap_table_addn(r->headers_out, hdr->header, hdr->value);
               break;
           case hdr_append:
  -	    /*
  -	     * "Vary" is particularly sensitive to duplicate tokens;
  -	     * they break some browsers.
  -	     */
  -	    if (strcasecmp(hdr->header, "Vary") == 0) {
  -		ap_table_mergen_unique_token(r->headers_out, hdr->header,
  -					     hdr->value);
  -	    }
  -	    else {
  -		ap_table_mergen(r->headers_out, hdr->header, hdr->value);
  -	    }
  +            ap_table_mergen(r->headers_out, hdr->header, hdr->value);
               break;
           case hdr_set:
               ap_table_setn(r->headers_out, hdr->header, hdr->value);
  
  
  
  1.101     +6 -15     apache-1.3/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- mod_negotiation.c	1999/07/28 17:37:18	1.100
  +++ mod_negotiation.c	1999/07/29 17:54:06	1.101
  @@ -2194,21 +2194,12 @@
       if (neg->is_transparent || vary_by_type || vary_by_language ||
           vary_by_language || vary_by_charset || vary_by_encoding) {
   
  -	if (neg->is_transparent) {
  -	    ap_table_mergen_unique_token(hdrs, "Vary", "negotiate");
  -	}
  -	if (vary_by_type) {
  -	    ap_table_mergen_unique_token(hdrs, "Vary", "accept");
  -	}
  -	if (vary_by_language) {
  -	    ap_table_mergen_unique_token(hdrs, "Vary", "accept-language");
  -	}
  -	if (vary_by_charset) {
  -	    ap_table_mergen_unique_token(hdrs, "Vary", "accept-charset");
  -	}
  -	if (vary_by_encoding) {
  -	    ap_table_mergen_unique_token(hdrs, "Vary", "accept-encoding");
  -	}
  +        ap_table_mergen(hdrs, "Vary", 2 + ap_pstrcat(r->pool,
  +            neg->is_transparent ? ", negotiate"       : "",
  +            vary_by_type        ? ", accept"          : "",
  +            vary_by_language    ? ", accept-language" : "",
  +            vary_by_charset     ? ", accept-charset"  : "",
  +            vary_by_encoding    ? ", accept-encoding" : "", NULL));
       }
   
       if (neg->is_transparent) { /* Create TCN response header */
  
  
  
  1.143     +2 -2      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- mod_rewrite.c	1999/07/28 17:37:20	1.142
  +++ mod_rewrite.c	1999/07/29 17:54:06	1.143
  @@ -1880,7 +1880,7 @@
           }
   	vary = ap_table_get(r->notes, VARY_KEY_THIS);
   	if (vary != NULL) {
  -	    ap_table_merge_unique_token(r->notes, VARY_KEY, vary);
  +	    ap_table_merge(r->notes, VARY_KEY, vary);
   	    ap_table_unset(r->notes, VARY_KEY_THIS);
   	}
       }
  @@ -3781,7 +3781,7 @@
               continue;
           }
           if (strcasecmp(hdrs[i].key, name) == 0) {
  -	    ap_table_merge_unique_token(r->notes, VARY_KEY_THIS, name);
  +	    ap_table_merge(r->notes, VARY_KEY_THIS, name);
               return hdrs[i].val;
           }
       }
  
  
  
  1.23      +0 -2      apache-1.3/src/support/httpd.exp
  
  Index: httpd.exp
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/support/httpd.exp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- httpd.exp	1999/07/28 17:37:22	1.22
  +++ httpd.exp	1999/07/29 17:54:14	1.23
  @@ -337,8 +337,6 @@
   ap_table_get
   ap_table_merge
   ap_table_mergen
  -ap_table_mergen_unique_token
  -ap_table_merge_unique_token
   ap_table_set
   ap_table_setn
   ap_table_unset
  
  
  

Mime
View raw message