httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_alias.c
Date Thu, 31 Jan 2002 20:29:41 GMT
coar        02/01/31 12:29:41

  Modified:    src      CHANGES
               src/modules/standard mod_alias.c
  Log:
  If the RedirectMatch target is an abs_path, make it an absoluteURI
  
  Revision  Changes    Path
  1.1765    +3 -2      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1764
  retrieving revision 1.1765
  diff -u -u -r1.1764 -r1.1765
  --- CHANGES	31 Jan 2002 18:28:01 -0000	1.1764
  +++ CHANGES	31 Jan 2002 20:29:40 -0000	1.1765
  @@ -3,8 +3,9 @@
     *) The Location: response header field, used for external
        redirect, *must* be an absoluteURI.  The Redirect directive
        tested for that, but RedirectMatch didn't -- it would allow
  -     almost anything through.  Now it, too, will correctly varf
  -     if the redirection target isn't an absoluteURI.  [Ken Coar]
  +     almost anything through.  Now it will try to turn an abs_path
  +     into an absoluteURI, but it will correctly varf like Redirect
  +     if the final redirection target isn't an absoluteURI.  [Ken Coar]
   
     *) apxs: fix bug that prevented -S option from containing quotes.
        [Ben Laurie]
  
  
  
  1.47      +10 -1     apache-1.3/src/modules/standard/mod_alias.c
  
  Index: mod_alias.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_alias.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -u -r1.46 -r1.47
  --- mod_alias.c	31 Jan 2002 18:28:01 -0000	1.46
  +++ mod_alias.c	31 Jan 2002 20:29:41 -0000	1.47
  @@ -393,11 +393,20 @@
   
       if ((ret = try_alias_list(r, dirconf->redirects, 1, &status)) != NULL) {
           if (ap_is_HTTP_REDIRECT(status)) {
  +            if (ret[0] == '/') {
  +                char *orig_target = ret;
  +
  +                ret = ap_construct_url(r->pool, ret, r);
  +                ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, r,
  +                              "incomplete redirection target of '%s' for "
  +                              "URI '%s' modified to '%s'",
  +                              orig_target, r->uri, ret);
  +            }
               if (!ap_is_url(ret)) {
                   status = HTTP_INTERNAL_SERVER_ERROR;
                   ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
                                 "cannot redirect '%s' to '%s'; "
  -                              "target is not a valid absoluteURI",
  +                              "target is not a valid absoluteURI or abs_path",
                                 r->uri, ret);
               }
               else {
  
  
  

Mime
View raw message