Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E3274200BA1 for ; Mon, 17 Oct 2016 22:38:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E193A160AEC; Mon, 17 Oct 2016 20:38:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 32844160AE2 for ; Mon, 17 Oct 2016 22:38:25 +0200 (CEST) Received: (qmail 26007 invoked by uid 500); 17 Oct 2016 20:38:23 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 25996 invoked by uid 99); 17 Oct 2016 20:38:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2016 20:38:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5E79FC21D3 for ; Mon, 17 Oct 2016 20:38:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ZrIFHG7CQtxS for ; Mon, 17 Oct 2016 20:38:21 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1AD685F368 for ; Mon, 17 Oct 2016 20:38:21 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id q126so138828308vkd.2 for ; Mon, 17 Oct 2016 13:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=cveclSO8i5uAsZiSaHz/kffU4mCOhEEdl8I8m7/ysR4=; b=R7zyFEXCmWBheEkkZ2xOzw0Dt85/GR0WPtDSIUYtoPgdCaOUHHUQFirtpgnSipKDyZ naqu28tCmvY76CWyw2dUQq202B6WRFTHxk47+piSMFkh9kPVsokVj5xEDlegAEpJSYDx d9t7jeHEc2yN5RzoFihJb9jtaNdvygJOFiaUY6mkPsRbLXvGV2gDvMtleT7Nd5fA8vus 1GRd0sbeU5XMxWh9NmTumeaT8yFTOQwPHUrtXNRr9BJCQdxDuIZqjkNtaPQYym10ErJQ hJHbvUvT3C8xNzK64naQ2hQ7ovQ11j9i4mC/Baq/bVUi0udGWbWDn7cD0FlA2UhXsJfL Gw9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=cveclSO8i5uAsZiSaHz/kffU4mCOhEEdl8I8m7/ysR4=; b=bM0VI68u9FwIroztDyVlj8IMRgFiiJxTCjwjHN6gvqK/HmxfQHOMWjo+D0TGGv0bbb NUHvfbMlu6lIVuxC8UE6jm2w7Z9RAo3OTapxPEwzAh1ahCiuV2GBxe9B5jgl2nmoWVF0 WV4yq8rN0fjTeyNOpNAbeneXqTT9BSPtamHrBYKe5JSYr3AbInR6FQV5GGWBMGGB/DCQ EMJJZoALBdR9DIWlwREhxKOetQktWDcmhrPtYLdxUMvHR5ngO266QHzfdHDgAn0Yf5BW SWYiSR7JqdJqawT64A1LSyEZ/b/Cub7f3yYQFmWQ8EP17xNUoFwt/9dvGdcb1f/lWfQJ 8p/g== X-Gm-Message-State: AA6/9RlUyqpaHZOgCBZ+1dH8ezuZJxxojS/hdL7rRby3cF20TMsk6jCYABz0OivzFKQbw1l8GXKkjxthno+xjw== X-Received: by 10.31.58.137 with SMTP id h131mr16756055vka.137.1476736697273; Mon, 17 Oct 2016 13:38:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.2.77 with HTTP; Mon, 17 Oct 2016 13:38:16 -0700 (PDT) In-Reply-To: <34f6f70a-b9cb-ac80-244d-7556d0a7dc28@kippdata.de> References: <352db2ee-ea9e-a965-3543-0242ed7251c3@apache.org> <34f6f70a-b9cb-ac80-244d-7556d0a7dc28@kippdata.de> From: Mark Juszczec Date: Mon, 17 Oct 2016 16:38:16 -0400 Message-ID: Subject: Re: Tomcat 8, AJP 1.3 UTF-8/ISO-8859-1 conversion problem To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11440236449385053f158eb1 archived-at: Mon, 17 Oct 2016 20:38:26 -0000 --001a11440236449385053f158eb1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Oct 17, 2016 at 8:20 AM, Rainer Jung wrote: > Am 17.10.2016 um 12:35 schrieb Mark Juszczec: > >> On Mon, Oct 17, 2016 at 4:29 AM, Mark Thomas wrote: >> >> >>> A small hint. I'd expect those to be % encoded. >>> >>> >> Thank you very much for your reply. >> >> I've been thinking the problem is lack of % encoding after reading: >> >> *"Default encoding for GET* >> The character set for HTTP query strings (that's the technical term for >> 'GET parameters') can be found in sections 2 and 2.1 the "URI Syntax" >> specification. The character set is defined to be US-ASCII >> . Any character that does not map to >> US-ASCII must be encoded in some way. Section 2.1 of the URI Syntax >> specification says that characters outside of US-ASCII must be encoded >> using >> % escape sequences: each character is encoded as a literal % followed b= y >> the two hexadecimal codes which indicate its character code. Thus, a >> (US-ASCII >> character code 97 =3D 0x61) is equivalent to %61. There *is no default >> encoding for URIs* specified anywhere, which is why there is a lot of >> confusion when it comes to decoding these values. " >> >> from http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8 >> >> Do you know if there's a way to force something (mod_jk, mod_rewrite or >> something else) to % encode the data being fed into the AJP port? >> > > You can force nod_jk to %-encode the URI before forwarding: > > JkOptions +ForwardURIEscaped > > I've tried adding +ForwardURIEscaped in my conf file as follows: # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURIEscaped -ForwardDirectories I would have expected mod_jk log to show the data % encoded, but it does not: text: J O =C3=8B =E2=80=B9 L hex: 0x4a 0x4f 0xc3 0x8b 0x4c I had expected to see something like: JO%C3%8BL Is that reasonable? Does it make sense? Could something be turning off the encoding? Do the headers values need to be set to something specific? --001a11440236449385053f158eb1--