httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13204] - RewriteRule with RewriteMap ignores default value
Date Fri, 04 Oct 2002 16:39:32 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13204>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13204

RewriteRule with RewriteMap ignores default value





------- Additional Comments From trawick@apache.org  2002-10-04 16:39 -------
Please try this change to mod_rewrite at around line 2968.

Index: modules/mappers/mod_rewrite.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
retrieving revision 1.134
diff -u -r1.134 mod_rewrite.c
--- modules/mappers/mod_rewrite.c       30 Aug 2002 04:47:57 -0000      1.134
+++ modules/mappers/mod_rewrite.c       4 Oct 2002 16:37:02 -0000
@@ -2968,7 +2968,7 @@
     if ((rv = apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY,
                               0 /* irrelevant when reading */, r->pool)) == 
APR_SUCCESS) {
         rv = apr_dbm_fetch(dbmfp, dbmkey, &dbmval);
-        if (rv == APR_SUCCESS) {
+        if (rv == APR_SUCCESS && dbmval.dptr != NULL) {
             memcpy(buf, dbmval.dptr,
                    dbmval.dsize < sizeof(buf)-1 ?
                    dbmval.dsize : sizeof(buf)-1  );

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message