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 CF910200C21 for ; Mon, 20 Feb 2017 15:33:55 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CE1C9160B73; Mon, 20 Feb 2017 14:33:55 +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 F3085160B62 for ; Mon, 20 Feb 2017 15:33:54 +0100 (CET) Received: (qmail 89051 invoked by uid 500); 20 Feb 2017 14:33:49 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 88956 invoked by uid 99); 20 Feb 2017 14:33:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2017 14:33:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2A3E61A0384 for ; Mon, 20 Feb 2017 14:33:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id To52Ao9OH7lY for ; Mon, 20 Feb 2017 14:33:45 +0000 (UTC) Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com [209.85.128.181]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C403F5F5FD for ; Mon, 20 Feb 2017 14:33:44 +0000 (UTC) Received: by mail-wr0-f181.google.com with SMTP id z61so65115891wrc.1 for ; Mon, 20 Feb 2017 06:33:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=xHYlzlUARPdKGaN2EARh/hTZOa9E2yBoV6B+wkNKElY=; b=dY2ZkhJdfuYGHPDbq27WLjb564YINHKd6xqx6p+dgXxNkDVtfSXaz2PJMKjfKLpxEl t6A9lOhxAVkt5DBxHvs/PDiBwKOyXWIe6oHzYjQVdBPmCmx54Ir2JpOy2JveQ/3LEoj3 O0fzJD4KJKrI8GSOfIgXqGhIwvud3V/k5Q2GPeTOynP8cyD+37rxH1qaKCgExaCIBnzk 3Z8Rh2HOAFjad6i6HMoAe/c2uH8VVO6Ap+5Mqyg7n6k6+kjmNxZ7TwLw3JOVgIOWpi7E R060d4i5PWwSVTO3DGlkoMYMqPC9zq5TS5XCP1P7A5/WEe/F3e1QmgXNCcWezDnoVq/T 6dMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=xHYlzlUARPdKGaN2EARh/hTZOa9E2yBoV6B+wkNKElY=; b=EU9C2VI3GE4hIeOd4zbN94PcK3lVR31h9eMaR1RTqwVuh/0rKIO0kkqctQQhR1n6mM IjmHqqTqHu6rynnMT0F2FgEn2k7U7mlccXjWVW05zZPYip9K+hxyk8N2G+znRmoVJlvr 6QZRqdbrGuObSbTIeE8ejh+/x6jyUEj36Fy4MEFjOQfbDZ8jqh1coCAHs8PR3xhFTKQU NvfZeBZM+foORbBjY44+zwte7PXwD+akH5LK051Ixrl5jH2pjKXnOJZ+UzbBh41mTklb mIn4FE/wjV+ssv1jqWc750osZsg+CuJNhj1a/H5+iuNHnZvF0ULfu3+6IvgQk4SojV3S X1ig== X-Gm-Message-State: AMke39mH+/BjDtY9TczZpWs9JI/NhDaHbolQBwmBC+47EzSkjO+E3AmDvEKQB8cr//EThA== X-Received: by 10.223.146.196 with SMTP id 62mr15053783wrn.199.1487601218044; Mon, 20 Feb 2017 06:33:38 -0800 (PST) Received: from [10.36.226.98] ([80.169.137.53]) by smtp.googlemail.com with ESMTPSA id d6sm13717495wmd.6.2017.02.20.06.33.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2017 06:33:36 -0800 (PST) Subject: =?UTF-8?Q?Re:_CXF_2.7.8:_Content-Type_value_and_Headers.content-typ?= =?UTF-8?Q?e_value_doesn=c2=b4t_match_in_logs?= To: users@cxf.apache.org References: <484cc0ec-494f-e7e4-e0a1-d85bf06d5ce1@gmail.com> From: Sergey Beryozkin Message-ID: Date: Mon, 20 Feb 2017 14:33:36 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit archived-at: Mon, 20 Feb 2017 14:33:56 -0000 Hi I'm only not sure where this extra value is coming from, I did a quick test on the master: ID: 2 Address: http://localhost:9001/bookstore/emptyput Encoding: UTF-8 Http-Method: PUT Content-Type: application/json Headers: {Accept=[*/*], Cache-Control=[no-cache], connection=[keep-alive], content-type=[application/json], Host=[localhost:9001], Pragma=[no-cache], User-Agent=[Apache-CXF/3.2.0-SNAPSHOT]} Perhaps it was a 2.7.x 'feature' - can you please try CXF 3.0.x ? Cheers, Sergey On 16/02/17 20:36, Jose María Zaragoza wrote: > 2017-02-16 14:09 GMT+01:00 Sergey Beryozkin : >> Hi >> >> I'm really not aware of CXF 2.7.x augmenting the content type and I can only >> imagine that there's some filter (custom or from the 3rd party servlet >> filter library) that your application may have that adds a value to Map of >> headers for Content-Type if a charset property is not set... > > Thanks Sergey > But the problem is ( in the second case, for example ) that > Content-Type header doesn't match with content-type value in Headers > > application/json != [application/json, application/json; charset=UTF-8] > > I thought that Headers showed the HTTP headers, in raw > It could haves such a filter , but , in this case, both values should > be equals , right ? > > Regards > >> >> Cheers, Sergey >> >> >> On 16/02/17 11:58, Jose María Zaragoza wrote: >>> >>> Hello: >>> >>> I've got a question about how CXF 2.7.8 prints headers logs >>> I've got a REST webservice deployed in a Tomcat 7.0 server, listening >>> on a secure port (https) >>> >>> Sometimes my service receives requests like the next one: >>> >>> Address: https://example.com/WS/user1/login >>> Encoding: UTF-8 >>> Http-Method: POST >>> Content-Type: application/json, application/json; charset=UTF-8 >>> Headers: {accept-encoding=[gzip], connection=[Keep-Alive], >>> Content-Length=[230], content-type=[application/json, >>> application/json; charset=UTF-8], host=[example.com], >>> user-agent=[Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-G531F >>> Build/LMY48B)]} >>> Payload: { ... } >>> >>> Look at Content-Type value and Headers.content-type value: they >>> match. All right >>> And I reject that request caused by content-type is not supported >>> >>> But sometimes my service receives requests like the next one: >>> >>> Address: https://example.com/WS/user2/login >>> Encoding: ISO-8859-1 >>> Http-Method: POST >>> Content-Type: application/json >>> Headers: {accept-encoding=[gzip], connection=[Keep-Alive], >>> Content-Length=[232], content-type=[application/json, >>> application/json; charset=UTF-8], host=[example.com], >>> user-agent=[Dalvik/2.1.0 (Linux; U; Android 6.0.1; SM-G900F >>> Build/MMB29M)]} >>> Payload: { ... } >>> >>> Look at Content-Type value and Headers.content-type value: they don't >>> match !! >>> Why ? Should they be the same value ? >>> In this case, I accept the request >>> >>> >>> Thanks and regards >>> >> >> >> -- >> Sergey Beryozkin >> >> Talend Community Coders >> http://coders.talend.com/