You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2007/11/07 11:53:19 UTC
svn commit: r592694 - in /httpd/httpd/trunk: CHANGES
modules/filters/mod_charset_lite.c
Author: trawick
Date: Wed Nov 7 02:53:18 2007
New Revision: 592694
URL: http://svn.apache.org/viewvc?rev=592694&view=rev
Log:
mod_charset_lite: Don't crash when the request has no associated
filename.
(r->filename unset)
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/filters/mod_charset_lite.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=592694&r1=592693&r2=592694&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Nov 7 02:53:18 2007
@@ -2,6 +2,9 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) mod_charset_lite: Don't crash when the request has no associated
+ filename. [Jeff Trawick]
+
*) mod_ssl: Fix TLS upgrade (RFC 2817) support. PR 41231. [Joe Orton]
*) scoreboard: Correctly declare ap_time_process_request.
Modified: httpd/httpd/trunk/modules/filters/mod_charset_lite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_charset_lite.c?rev=592694&r1=592693&r2=592694&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_charset_lite.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_charset_lite.c Wed Nov 7 02:53:18 2007
@@ -206,7 +206,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 */
@@ -229,10 +231,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;