Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A661811016 for ; Wed, 3 Sep 2014 14:55:16 +0000 (UTC) Received: (qmail 34526 invoked by uid 500); 3 Sep 2014 14:25:49 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 14403 invoked by uid 500); 3 Sep 2014 14:25:28 -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 91182 invoked by uid 99); 3 Sep 2014 12:27:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 12:27:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dmikusa@pivotal.io designates 74.125.82.181 as permitted sender) Received: from [74.125.82.181] (HELO mail-we0-f181.google.com) (74.125.82.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 12:27:31 +0000 Received: by mail-we0-f181.google.com with SMTP id x48so8574142wes.12 for ; Wed, 03 Sep 2014 05:27:10 -0700 (PDT) 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:date :message-id:subject:from:to:content-type; bh=fzwaCv64SZmoeeEBuo5YlAnN/cCrRBWiJ+Sif8k5Cyc=; b=WKQtYRuYCty5y3mH88yMol14EgkOCxaZ9RYbAJ0zCUO1/Hxa6TfsWR2vRd/HciIqMl Gs14qk/VXxbxjGoY9oWgA/kqm/D+/M/TPD6tLyhBuETDQO4eNEyqVAJw7XQOgXhzr9WR OrnNGZEtA9amvr8xA2vFMnHLh/jpidMmGMATMEBcmCsnHYNvSHmddVFBHtxg4yUfL/j+ Vj0ehpF2Uos+zbH+7GxVbX9RZCDl0dah39HfBrY948WGWKu0XXOaU1ROC2Uo4ZDEh6a3 br3C5KaB+ktP4NwVJgGcN5Qr4ZwaCu47BG7UmHglXZTuizLfoxYjpqx6MNkZnbPGKCDL 9PGQ== X-Gm-Message-State: ALoCoQnB8ydqU71iyzXcI08ooal9//YrsijbputJG4kEEr307ElJNcsbre5U/gZ445CnqjheksJ/ MIME-Version: 1.0 X-Received: by 10.180.20.40 with SMTP id k8mr35756407wie.38.1409747228660; Wed, 03 Sep 2014 05:27:08 -0700 (PDT) Received: by 10.217.12.205 with HTTP; Wed, 3 Sep 2014 05:27:08 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Sep 2014 08:27:08 -0400 Message-ID: Subject: Re: UTF-8 encoded request URI From: Daniel Mikusa To: Tomcat Users List Content-Type: multipart/alternative; boundary=bcaec53d57afc9a77f0502285af1 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec53d57afc9a77f0502285af1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Sep 3, 2014 at 7:45 AM, Lulseged Zerfu wrote: > Hi I am getting bad request from tomcat when I send UTF-8 encoded reques= t > to my application. Can you give an example of the request? Are the non-ascii characters in the URL or in the payload of your request (or both)? > I have configured connector in my server.xml with URIEncoding=3D=E2=80=9D= UTF-8=E2=80=9D. Not necessary with Tomcat 8. The default for URIEncoding is "UTF-8". Unless you have set the system property org.apache.catalina.STRICT_SERVLET_COMPLIANCE=3Dtrue. That will override the URIEncoding and set it to "ISO-8859-1". I have set charset in the request to UTF-8. How can I solve 400 Bad > request? How can I tell tomcat to decode request URI instead of respondin= g > with 400 Bad request? You seem certain that the 400 error is due to the encoding. Perhaps it's something else? What have you done to troubleshoot this? Have you tried stepping through things with a debugger? Dan > I will appreciate any help. > I am using tomcat 8.0.11 on windows 8 x64. I have also tried with tomcat > 7.0.55. BRLulseged --bcaec53d57afc9a77f0502285af1--