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 0DAAE200C50 for ; Sat, 8 Apr 2017 11:41:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0C551160B96; Sat, 8 Apr 2017 09:41:46 +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 55162160B88 for ; Sat, 8 Apr 2017 11:41:45 +0200 (CEST) Received: (qmail 67698 invoked by uid 500); 8 Apr 2017 09:41:44 -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 67687 invoked by uid 99); 8 Apr 2017 09:41:44 -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; Sat, 08 Apr 2017 09:41:44 +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 E84361A011B for ; Sat, 8 Apr 2017 09:41:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id r6XdBrGp2EVR for ; Sat, 8 Apr 2017 09:41:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 86CAF5F295 for ; Sat, 8 Apr 2017 09:41:42 +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 D6798E04FE for ; Sat, 8 Apr 2017 09:41:41 +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 8D15F24066 for ; Sat, 8 Apr 2017 09:41:41 +0000 (UTC) Date: Sat, 8 Apr 2017 09:41:41 +0000 (UTC) From: "Andrei Ivanov (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-7322) Response.StatusType.getReasonPhrase not working MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 08 Apr 2017 09:41:46 -0000 [ https://issues.apache.org/jira/browse/CXF-7322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961751#comment-15961751 ] Andrei Ivanov commented on CXF-7322: ------------------------------------ Btw, Tomcat 9 will not send a reason phrase and for 8.5 is just optional, after a lot of people insisted: https://bz.apache.org/bugzilla/show_bug.cgi?id=60362 > Response.StatusType.getReasonPhrase not working > ----------------------------------------------- > > Key: CXF-7322 > URL: https://issues.apache.org/jira/browse/CXF-7322 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.1.10 > Reporter: Vjacheslav Borisov > Priority: Minor > > I have custom Response.StatusType class > {code} > public class CustomResponseStatus implements Response.StatusType { > > private final int statusCode; > private final String reasonPhrase; > public CustomResponseStatus(int statusCode, String reasonPhrase) { > this.statusCode = statusCode; > this.reasonPhrase = reasonPhrase; > } > @Override > public int getStatusCode() { > return statusCode; > } > @Override > public Response.Status.Family getFamily() { > return Response.Status.Family.familyOf(statusCode); > } > @Override > public String getReasonPhrase() { > return reasonPhrase; > } > } > {code} > Usage: > Response.StatusType status=new CustomResponseStatus(453,"custom reasonPhrase "); > return Response.status(status).entity("Hello " + a + ", Welcome to CXF RS Spring Boot World!!!").build(); > I do not see method getReasonPhrase() gets called and reasonPhrase in response not filled: > curl -v 'http://localhost:8080/services/helloservice/sayHello/reason/ApacheCxfUser' > * Hostname was NOT found in DNS cache > * Trying ::1... > * Connected to localhost (::1) port 8080 (#0) > > GET /services/helloservice/sayHello/reason/ApacheCxfUser HTTP/1.1 > > User-Agent: curl/7.37.0 > > Host: localhost:8080 > > Accept: */* > > > < HTTP/1.1 453 > E.g. there should be > HTTP/1.1 453 custom reasonPhrase > Example project > https://github.com/slavb18/spring_boot_scan -- This message was sent by Atlassian JIRA (v6.3.15#6346)