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 52A0D200BB2 for ; Fri, 14 Oct 2016 16:26:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 51B36160AD0; Fri, 14 Oct 2016 14:26:24 +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 8A6FA160AFC for ; Fri, 14 Oct 2016 16:26:23 +0200 (CEST) Received: (qmail 76723 invoked by uid 500); 14 Oct 2016 14:26:22 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 76252 invoked by uid 99); 14 Oct 2016 14:26:22 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2016 14:26:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E32DF2C4C75 for ; Fri, 14 Oct 2016 14:26:21 +0000 (UTC) Date: Fri, 14 Oct 2016 14:26:21 +0000 (UTC) From: "Colm O hEigeartaigh (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (CXF-6640) [Locale Issue] HTTP header Issue for IOS 9 + Chinese Language user MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 14 Oct 2016 14:26:24 -0000 [ https://issues.apache.org/jira/browse/CXF-6640?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Colm O hEigeartaigh closed CXF-6640. ------------------------------------ > [Locale Issue] HTTP header Issue for IOS 9 + Chinese Language user > ------------------------------------------------------------------ > > Key: CXF-6640 > URL: https://issues.apache.org/jira/browse/CXF-6640 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.1.0 > Environment: Linux Server + Java 7 + IOS 9 + HTTP Req > Reporter: WeiTah CHAI > Assignee: Sergey Beryozkin > Labels: patch > Fix For: 3.1.1 > > Original Estimate: 48h > Remaining Estimate: 48h > > Encountered http language issue in Apple IOS recently: > -=09After they upgrade to IOS9 > -=09If they enable Chinese input > When HTTP request initiated from IOS 9, there will have additional HTTP H= eader for "Accept-Language", and if the Chinese Input is enable, the header= would look like: "Accept-Language: en-GB;q=3D1, zh-Hans-SG;q=3D0.9, en-SG;= q=3D0.8". > Somehow the locale with "variants" is not support in apache CXF, and Ille= gal locale exception throw. =20 > -=09 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cxf/cxf-r= t-frontend-jaxrs/3.1.0/org/apache/cxf/jaxrs/utils/HttpUtils.java/=20 > -=09Line #280. =20 > -=09Using version 2.7.5 but the same issue still remain in 3.1.0 > Quick fix is much appreciated. Thank you > Sample request: > =E2=80=94 > curl -X "POST" "https://xxxxx.itc.xxxx.com/odata/core.svc/Authenticate" \ > -H "User-Agent: xxxx/0.0.1 (iPhone; iOS 9.0.2; Scale/2.00)" \ > -H "Accept-Language: en-GB;q=3D1, zh-Hans-SG;q=3D0.9, en-SG;q=3D0.8" \ > -H "Content-Type: application/json" \ > -H "Accept: application/json; charset=3Dutf-8" \ > -d "{\"Origin\":\"xxxx.internal\\/50 (version 0.0.1; Cocoa)\",\"Scope\":\= "register-anonymous\",\"ProviderName\":\"xxxxx\",\"Device\":{\"Type\":\"iOS= \",\"Model\":\"iPhone\",\"OsVersion\":\"9.0.2\",\"OsName\":\"iPhone OS\"}}" > =E2=80=94 > POST /xxxxx/odata/core.svc/Authenticate HTTP/1.1 > Accept: application/json; charset=3Dutf-8 > Content-Type: application/json > Accept-Language: en-GB;q=3D1, zh-Hans-SG;q=3D0.9, en-SG;q=3D0.8 > User-Agent: xxxx/0.0.1 (iPhone; iOS 9.0.2; Scale/2.00) > Host: xxxx.itc.xxx.com > Connection: close > Content-Length: 212 > {"Origin":"xxxxxx.internal\/50 (version 0.0.1; Cocoa)","Scope":"register-= anonymous","ProviderName":"xxxxxxx","Device":{"Type":"iOS","Model":"iPhone"= ,"OsVersion":"9.0.2","OsName":"iPhone OS"}} > Response: > HTTP/1.1 500 Server Error > Server: nginx/1.4.6 (Ubuntu) > Date: Wed, 07 Oct 2015 17:20:08 GMT > Content-Type: text/plain > Content-Length: 40 > Connection: close > Access-Control-Allow-Origin: * > Access-Control-Allow-Credentials: true > Exception during error handling occurred! -- This message was sent by Atlassian JIRA (v6.3.4#6332)