You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ge...@apache.org on 2004/04/09 02:56:26 UTC

cvs commit: httpd-2.0/server core.c

geoff       2004/04/08 17:56:26

  Modified:    .        CHANGES
               server   core.c
  Log:
  Enable special ErrorDocument value 'default' which restores the
  canned server response for the scope of the directive.
  
  Revision  Changes    Path
  1.1449    +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1448
  retrieving revision 1.1449
  diff -u -r1.1448 -r1.1449
  --- CHANGES	5 Apr 2004 18:00:15 -0000	1.1448
  +++ CHANGES	9 Apr 2004 00:56:25 -0000	1.1449
  @@ -2,6 +2,10 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) Enable special ErrorDocument value 'default' which restores the
  +     canned server response for the scope of the directive.
  +     [Geoffrey Young]
  +
     *) Allow Digest providers to return AUTH_DENIED to propagate a 401
        status and terminate the provider chain prior to checking the password.
        [Geoffrey Young]
  
  
  
  1.271     +16 -10    httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.270
  retrieving revision 1.271
  diff -u -r1.270 -r1.271
  --- core.c	25 Mar 2004 14:27:27 -0000	1.270
  +++ core.c	9 Apr 2004 00:56:26 -0000	1.271
  @@ -271,9 +271,7 @@
                  sizeof(*conf->response_code_strings) * RESPONSE_CODES);
   
           for (i = 0; i < RESPONSE_CODES; ++i) {
  -            if (new->response_code_strings[i] != NULL) {
  -                conf->response_code_strings[i] = new->response_code_strings[i];
  -            }
  +            conf->response_code_strings[i] = new->response_code_strings[i];
           }
       }
       /* Otherwise we simply use the base->response_code_strings array
  @@ -1178,13 +1176,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] = NULL;
  +        }
  +        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;
  
  
  

Re: cvs commit: httpd-2.0/server core.c

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

> Just edit the .xml.  (There is a big ugly note at the top of the .html.en
> telling you not to touch it.)  Then you can build the .html.en using
> the instructions here:
> http://httpd.apache.org/docs-project/docsformat.html
> Or if you don't want to bother, just do the .xml and someone else will
> take care of building the .html.

cool, I'll do that.  thanks.  (and sorry I didn't see the note :)

--Geoff

Re: cvs commit: httpd-2.0/server core.c

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 8 Apr 2004, Geoffrey Young wrote:
> geoff@apache.org wrote:
> > geoff       2004/04/08 17:56:26
> >
> >   Modified:    .        CHANGES
> >                server   core.c
> >   Log:
> >   Enable special ErrorDocument value 'default' which restores the
> >   canned server response for the scope of the directive.
>
> if this stays in 2.1 it will need some docs.  I saw that the 2.1 docs are
> maintained in HEAD just as with the code, but I'm unsure of whether to edit
> the .xml, .html.en, or both.

Just edit the .xml.  (There is a big ugly note at the top of the .html.en
telling you not to touch it.)  Then you can build the .html.en using
the instructions here:
http://httpd.apache.org/docs-project/docsformat.html
Or if you don't want to bother, just do the .xml and someone else will
take care of building the .html.

Joshua.

Re: cvs commit: httpd-2.0/server core.c

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

geoff@apache.org wrote:
> geoff       2004/04/08 17:56:26
> 
>   Modified:    .        CHANGES
>                server   core.c
>   Log:
>   Enable special ErrorDocument value 'default' which restores the
>   canned server response for the scope of the directive.

if this stays in 2.1 it will need some docs.  I saw that the 2.1 docs are
maintained in HEAD just as with the code, but I'm unsure of whether to edit
the .xml, .html.en, or both.

--Geoff