httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r593175 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/filters/mod_charset_lite.c
Date Thu, 08 Nov 2007 14:52:22 GMT
Author: trawick
Date: Thu Nov  8 06:52:20 2007
New Revision: 593175

URL: http://svn.apache.org/viewvc?rev=593175&view=rev
Log:
rev 592694 from trunk:

mod_charset_lite: Don't crash when the request has no associated
filename.

Reviewed by: niq, rpluem


Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=593175&r1=593174&r2=593175&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Nov  8 06:52:20 2007
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.7
 
+  *) mod_charset_lite: Don't crash when the request has no associated
+     filename.  [Jeff Trawick]
+
   *) Core: fix possible crash at startup in case of nonexistent DocumentRoot.
      PR 39722 [Adrian Buckley <adrian.buckley ntlworld.com>]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=593175&r1=593174&r2=593175&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Nov  8 06:52:20 2007
@@ -79,14 +79,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_charset_lite: Don't crash when the request has no associated
-     filename.
-     trunk:
-       http://svn.apache.org/viewvc?rev=592694&view=rev
-     2.2.x patch:
-       trunk patch works
-     +1: trawick, niq, rpluem
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.c?rev=593175&r1=593174&r2=593175&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.c (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/mod_charset_lite.c Thu Nov  8 06:52:20 2007
@@ -205,7 +205,9 @@
         ap_log_rerror(APLOG_MARK,APLOG_DEBUG, 0, r,
                       "uri: %s file: %s method: %d "
                       "imt: %s flags: %s%s%s %s->%s",
-                      r->uri, r->filename, r->method_number,
+                      r->uri,
+                      r->filename ? r->filename : "(none)",
+                      r->method_number,
                       r->content_type ? r->content_type : "(unknown)",
                       r->main     ? "S" : "",    /* S if subrequest */
                       r->prev     ? "R" : "",    /* R if redirect */
@@ -228,10 +230,13 @@
     /* catch proxy requests */
     if (r->proxyreq) return DECLINED;
     /* mod_rewrite indicators */
-    if (!strncmp(r->filename, "redirect:", 9)) return DECLINED;
-    if (!strncmp(r->filename, "gone:", 5)) return DECLINED;
-    if (!strncmp(r->filename, "passthrough:", 12)) return DECLINED;
-    if (!strncmp(r->filename, "forbidden:", 10)) return DECLINED;
+    if (r->filename
+        && (!strncmp(r->filename, "redirect:", 9)
+            || !strncmp(r->filename, "gone:", 5)
+            || !strncmp(r->filename, "passthrough:", 12)
+            || !strncmp(r->filename, "forbidden:", 10))) {
+        return DECLINED;
+    }
     /* no translation when server and network charsets are set to the same value */
     if (!strcasecmp(dc->charset_source, dc->charset_default)) return DECLINED;
 



Mime
View raw message