Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 57349 invoked from network); 15 Dec 2008 10:41:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2008 10:41:16 -0000 Received: (qmail 96698 invoked by uid 500); 15 Dec 2008 10:41:27 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 96593 invoked by uid 500); 15 Dec 2008 10:41:26 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 96584 invoked by uid 99); 15 Dec 2008 10:41:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 02:41:26 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lingererhuang@hotmail.com designates 65.54.246.228 as permitted sender) Received: from [65.54.246.228] (HELO bay0-omc3-s28.bay0.hotmail.com) (65.54.246.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 10:41:11 +0000 Received: from hotmail.com ([65.55.136.17]) by bay0-omc3-s28.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 15 Dec 2008 02:40:50 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 15 Dec 2008 02:40:50 -0800 Message-ID: Received: from 58.62.25.8 by BAY131-DAV7.phx.gbl with DAV; Mon, 15 Dec 2008 10:40:47 +0000 X-Originating-IP: [58.62.25.8] X-Originating-Email: [lingererhuang@hotmail.com] X-Sender: lingererhuang@hotmail.com From: "lingerer huang" To: Subject: A patch for HttpRequest to make handle encoding in getParameter and getParameterValues in the same way Date: Mon, 15 Dec 2008 18:40:46 +0800 Message-ID: <983FF9EE252E4E52A08CF6C820765D37@HHD> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0003_01C95EE4.A4B8D1E0" X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcleoZY4MnA6p/DSTrqmJiPzahVo0Q== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-OriginalArrivalTime: 15 Dec 2008 10:40:50.0677 (UTC) FILETIME=[99053250:01C95EA1] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C95EE4.A4B8D1E0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Hi,cocooners: The patch is for cocoon 2.1.x,I just copy the code from getParameter to getParameterValues. Maybe this patch is useful for cocoon 2.2 too. Roy Huang ------=_NextPart_000_0003_01C95EE4.A4B8D1E0 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch.txt" ### Eclipse Workspace Patch 1.0 #P dojo1_1 Index: src/java/org/apache/cocoon/environment/http/HttpRequest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/java/org/apache/cocoon/environment/http/HttpRequest.java = (revision 723299) +++ src/java/org/apache/cocoon/environment/http/HttpRequest.java = (working copy) @@ -353,9 +353,12 @@ public String[] getParameterValues(String name) {=0A= String[] values =3D this.req.getParameterValues(name);=0A= if (values =3D=3D null) return null;=0A= - if (this.form_encoding =3D=3D null) {=0A= + if (this.form_encoding =3D=3D null || this.container_encoding = =3D=3D null) {=0A= return values;=0A= }=0A= + if (this.container_encoding.equals(this.form_encoding)) {=0A= + return values;=0A= + }=0A= String[] decoded_values =3D new String[values.length];=0A= for (int i =3D 0; i < values.length; ++i) {=0A= decoded_values[i] =3D decode(values[i]);=0A= ------=_NextPart_000_0003_01C95EE4.A4B8D1E0--