Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 80644 invoked from network); 9 Sep 2008 20:38:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Sep 2008 20:38:23 -0000 Received: (qmail 4291 invoked by uid 500); 9 Sep 2008 20:38:17 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 4231 invoked by uid 500); 9 Sep 2008 20:38:17 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 4220 invoked by uid 99); 9 Sep 2008 20:38:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 13:38:17 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 Sep 2008 20:37:27 +0000 Received: (qmail 79457 invoked by uid 2161); 9 Sep 2008 20:37:59 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id CCF2A1721C for ; Tue, 9 Sep 2008 22:37:48 +0200 (CEST) Message-ID: <48C6DEA8.4000706@apache.org> Date: Tue, 09 Sep 2008 22:38:00 +0200 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r691418 [2/2] - in /httpd/httpd/trunk: ./ docs/manual/mod/ modules/filters/ References: <20080902230148.F3F6F23889F7@eris.apache.org> <48C6D842.3060705@apache.org> In-Reply-To: <48C6D842.3060705@apache.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/09/2008 10:10 PM, Ruediger Pluem wrote: > > > On 09/03/2008 01:01 AM, niq@apache.org wrote: >> Added: httpd/httpd/trunk/modules/filters/sed1.c >> URL: >> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/sed1.c?rev=691418&view=auto >> >> ============================================================================== >> >> --- httpd/httpd/trunk/modules/filters/sed1.c (added) >> +++ httpd/httpd/trunk/modules/filters/sed1.c Tue Sep 2 16:01:47 2008 >> @@ -0,0 +1,957 @@ >> +/* >> + * Copyright (c) 2005, 2008 Sun Microsystems, Inc. All Rights Reserved. >> + * Use is subject to license terms. >> + * >> + * Copyright (c) 1984 AT&T >> + * All Rights Reserved >> + * >> + * Licensed under the Apache License, Version 2.0 (the "License"); >> + * you may not use this file except in compliance with the License. >> + * You may obtain a copy of the License at >> + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless >> required by applicable law or agreed to in writing, software + * >> distributed under the License is distributed on an "AS IS" BASIS, + * >> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or >> implied. + * See the License for the specific language governing >> permissions and >> + * limitations under the License. + */ >> + >> +#include "apr.h" >> +#include "apr_lib.h" >> +#include "libsed.h" >> +#include "sed.h" >> +#include "apr_strings.h" >> +#include "regexp.h" >> + >> +char *trans[040] = { >> + "\\01", >> + "\\02", >> + "\\03", >> + "\\04", >> + "\\05", >> + "\\06", >> + "\\07", >> + "-<", >> + "->", > > What are the above constants supposed to be. Opening the file in vi > shows that they are special > characters or better control characters. Looking with a hex editor > these () seem to be \\08. > Is this correct? > BTW: I noticed it because this commit message broke the atom feed of > mod_box for the cvs list > as these characters make the xml document of the feed invalid. But I > guess this is an error in mod_mbox. IMHO the following patch should fix the mod_mbox error by correctly encoding these chars: Index: module-2.0/mod_mbox_cte.c =================================================================== --- module-2.0/mod_mbox_cte.c (Revision 693585) +++ module-2.0/mod_mbox_cte.c (Arbeitskopie) @@ -91,6 +91,9 @@ else if (s[i] == '&') { j += 4; } + else if (((unsigned char) s[i]) < 32) { + j += 5; + } } /* If there is nothing to escape, just copy the body to the new @@ -118,6 +121,10 @@ memcpy(&x[j], "&", 5); j += 4; } + else if (((unsigned char) s[i]) < 32) { + apr_snprintf(&x[j], 6, "&#%02i;", s[i]); + j += 4; + } else { x[j] = s[i]; } As I have no environment where I can test mod_mbox can someone please check this patch? Regards RĂ¼diger