httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: httpd-2.0 CHANGES
Date Mon, 12 Jul 2004 17:03:19 GMT
geoff       2004/07/12 10:03:19

  Modified:    server   Tag: APACHE_2_0_BRANCH core.c
               .        Tag: APACHE_2_0_BRANCH CHANGES
  Log:
  Enable special ErrorDocument value 'default' which restores the
  canned server response for the scope of the directive
  Reviewed by:	nd, stas
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.225.2.24 +22 -7     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.225.2.23
  retrieving revision 1.225.2.24
  diff -u -r1.225.2.23 -r1.225.2.24
  --- core.c	10 Jul 2004 04:45:23 -0000	1.225.2.23
  +++ core.c	12 Jul 2004 17:03:18 -0000	1.225.2.24
  @@ -87,6 +87,9 @@
   AP_DECLARE_DATA ap_filter_rec_t *ap_net_time_filter_handle;
   AP_DECLARE_DATA ap_filter_rec_t *ap_core_input_filter_handle;
   
  +/* magic pointer for ErrorDocument xxx "default" */
  +static char errordocument_default;
  +
   static void *create_core_dir_config(apr_pool_t *a, char *dir)
   {
       core_dir_config *conf;
  @@ -701,6 +704,10 @@
   	return NULL;
       }
   
  +    if (dirconf->response_code_strings[error_index] == &errordocument_default) {
  +        return NULL;
  +    }
  +
       return dirconf->response_code_strings[error_index];
   }
   
  @@ -1186,13 +1193,21 @@
                               RESPONSE_CODES);
           }
   
  -        /* hack. Prefix a " if it is a msg; as that is what
  -         * http_protocol.c relies on to distinguish between
  -         * a msg and a (local) path.
  -         */
  -        conf->response_code_strings[index_number] = (what == MSG) ?
  -                apr_pstrcat(cmd->pool, "\"",msg,NULL) :
  -                apr_pstrdup(cmd->pool, msg);
  +        if (strcmp(msg, "default") == 0) {
  +            /* special case: ErrorDocument 404 default restores the
  +             * canned server error response
  +             */
  +            conf->response_code_strings[index_number] = &errordocument_default;
  +        }
  +        else {
  +            /* hack. Prefix a " if it is a msg; as that is what
  +             * http_protocol.c relies on to distinguish between
  +             * a msg and a (local) path.
  +             */
  +            conf->response_code_strings[index_number] = (what == MSG) ?
  +                    apr_pstrcat(cmd->pool, "\"",msg,NULL) :
  +                    apr_pstrdup(cmd->pool, msg);
  +        }
       }
   
       return NULL;
  
  
  
  No                   revision
  No                   revision
  1.988.2.314 +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.313
  retrieving revision 1.988.2.314
  diff -u -r1.988.2.313 -r1.988.2.314
  --- CHANGES	10 Jul 2004 07:47:21 -0000	1.988.2.313
  +++ CHANGES	12 Jul 2004 17:03:18 -0000	1.988.2.314
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.51
   
  +  *) Enable special ErrorDocument value 'default' which restores the
  +     canned server response for the scope of the directive
  +     [Geoffrey Young, Andre Malo]
  +
     *) work around MSIE Digest auth bug - if AuthDigestEnableQueryStringHack
        is set in r->subprocess_env allow mismatched query strings to pass.
        PR 27758.  [Paul Querna, Geoffrey Young]
  
  
  

Mime
View raw message