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 8C793200C88 for ; Fri, 2 Jun 2017 23:26:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8B919160BBA; Fri, 2 Jun 2017 21:26:08 +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 D542C160BD2 for ; Fri, 2 Jun 2017 23:26:07 +0200 (CEST) Received: (qmail 50414 invoked by uid 500); 2 Jun 2017 21:26:07 -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 50402 invoked by uid 99); 2 Jun 2017 21:26:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2017 21:26:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8682C18215B for ; Fri, 2 Jun 2017 21:26:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id IT_ho1wXSXQz for ; Fri, 2 Jun 2017 21:26:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 630045F3BF for ; Fri, 2 Jun 2017 21:26:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E94D2E0BDE for ; Fri, 2 Jun 2017 21:26:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5DB9921B59 for ; Fri, 2 Jun 2017 21:26:04 +0000 (UTC) Date: Fri, 2 Jun 2017 21:26:04 +0000 (UTC) From: "Victor Gonzales (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CXF-4504) MediaTypeHeaderProvider stores parameter values of Content-Type header as quoted strings if they're quoted in the header MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Jun 2017 21:26:08 -0000 [ https://issues.apache.org/jira/browse/CXF-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035445#comment-16035445 ] Victor Gonzales edited comment on CXF-4504 at 6/2/17 9:25 PM: -------------------------------------------------------------- I actually just ran into this problem again. Our client has started sending a Content-Type header with the charset value set to "UTF-8". I've coded a workaround using a custom interceptor to scrub the quotes before the {{MediaTypeHeaderProvider}} does its thing. Is this the best solution, or might something be done similar to CXF-7320? Thanks. We are on the 3.0.* version. was (Author: vigoca): I actually just ran into this problem again. Our client has started sending a Content-Type header with the charset value set to "UTF-8". I've coded a workaround using a custom interceptor to scrub the quotes before the {{MediaTypeHeaderProvider}} does its thing. Is this the best solution, or might something be done similar to CXF-7320? Thanks. > MediaTypeHeaderProvider stores parameter values of Content-Type header as quoted strings if they're quoted in the header > ------------------------------------------------------------------------------------------------------------------------ > > Key: CXF-4504 > URL: https://issues.apache.org/jira/browse/CXF-4504 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.3.1 > Reporter: Michal Gajdos > Assignee: Sergey Beryozkin > > If parameters of {{Content-Type}} header are quoted (e.g. boundary) then the whole quoted string is stored as a parameter value in {{MediaType}} instance. > Example: > Parsing the following header: > {{code}} > Content-Type: multipart/form-data;boundary="MrmiiyyJEqRYcIJyun5tMVIz70NuQ_nfD" > {{code}} > causes the {{boundary}} parameter in {{MediaType}} instance to have value {{"MrmiiyyJEqRYcIJyun5tMVIz70NuQ_nfD"}} instead of {{MrmiiyyJEqRYcIJyun5tMVIz70NuQ_nfD}}. > This is a problem when an application with both CXF and Jersey is deployed on a server. If {{RuntimeDelegate}} from CXF is used in Jersey application {{MediaTypeHeaderProvider}} may create a {{MediaType}} instance (when working with multipart) Jersey is not able to work with (because of the quoted boundary value). > For more details see: http://java.net/jira/browse/JERSEY-1420 -- This message was sent by Atlassian JIRA (v6.3.15#6346)