From reviews-return-20639-archive-asf-public=cust-asf.ponee.io@aurora.apache.org Mon Feb 19 07:34:42 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BDC4B180607 for ; Mon, 19 Feb 2018 07:34:41 +0100 (CET) Received: (qmail 71981 invoked by uid 500); 19 Feb 2018 06:34:40 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 71970 invoked by uid 99); 19 Feb 2018 06:34:40 -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, 19 Feb 2018 06:34:40 +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 AFC7CC1067; Mon, 19 Feb 2018 06:34:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.641 X-Spam-Level: ** X-Spam-Status: No, score=2.641 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled 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 h6Tk0o08zDDm; Mon, 19 Feb 2018 06:34:39 +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 A2C725F5DB; Mon, 19 Feb 2018 06:34:38 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3592AE00CB; Mon, 19 Feb 2018 06:34:38 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id AA358C404B1; Mon, 19 Feb 2018 06:34:37 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4866488650081945909==" MIME-Version: 1.0 Subject: Re: Review Request 65690: Make charset parsing in HTTP headers case insensitve From: Jordan Ly To: Santhosh Kumar Shanmugham , David McLaughlin , Renan DelValle , Stephan Erb Cc: Aurora ReviewBot , Aurora , Jordan Ly Date: Mon, 19 Feb 2018 06:34:36 -0000 Message-ID: <20180219063436.51513.32503@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jordan Ly X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/65690/ X-Sender: Jordan Ly References: <20180216205914.31721.76322@reviews-vm2.apache.org> In-Reply-To: <20180216205914.31721.76322@reviews-vm2.apache.org> Reply-To: Jordan Ly X-ReviewRequest-Repository: aurora --===============4866488650081945909== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65690/ ----------------------------------------------------------- (Updated Feb. 19, 2018, 6:34 a.m.) Review request for Aurora, David McLaughlin, Renan DelValle, Santhosh Kumar Shanmugham, and Stephan Erb. Changes ------- Use 'application/json' without charset specified Repository: aurora Description ------- Users have reported that the UI does not load in Firefox. Investigating the issue shows that Chrome and Safari will format charset into an uppercase `UTF-8` which is accepted by the servlet. However, Mozilla will leave the charset as lowercase `utf-8` which causes a 415 response. Charsets should be case-insensitive but the default Java `MediaType` class does not take this into account when parsing/comparing. I propose switching to Guava's `MediaType` class which does smarter comparisons. Diffs (updated) ----- src/main/java/org/apache/aurora/scheduler/http/api/ApiModule.java 2820cda42293649e02eff6122621d485cb803ac2 src/main/java/org/apache/aurora/scheduler/http/api/TContentAwareServlet.java d9df96896d83786596880105968dc7fcdc0168e5 src/test/java/org/apache/aurora/scheduler/http/api/ApiIT.java bfd117b4988c35c6b3f95508b2924bbd19b0c692 Diff: https://reviews.apache.org/r/65690/diff/2/ Changes: https://reviews.apache.org/r/65690/diff/1-2/ Testing ------- `./gradlew test` Manual testing in Safari, Chrome, and Firefox. Thanks, Jordan Ly --===============4866488650081945909==--