Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 89756 invoked from network); 7 Feb 2011 17:02:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2011 17:02:22 -0000 Received: (qmail 68716 invoked by uid 500); 7 Feb 2011 17:02:22 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 68609 invoked by uid 500); 7 Feb 2011 17:02:19 -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 68596 invoked by uid 99); 7 Feb 2011 17:02:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 17:02:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 17:02:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6DC5519C4E5 for ; Mon, 7 Feb 2011 17:01:57 +0000 (UTC) Date: Mon, 7 Feb 2011 17:01:57 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: <397728840.31.1297098117446.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <448728564.6697.1296710789562.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (CXF-3304) WebClient POST to a resource that returns 401 returns a blank InputStream when there's supposed to be text MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991469#comment-12991469 ] Sergey Beryozkin commented on CXF-3304: --------------------------------------- Hi Jason - I'm clueless :-). CXF HTTP Conduit clearly shows me that after conn.getResponseCode() returns 401, conn.getErrorStream() is called next and it returns null. Can you give me a favor please and post a non-empty request and see if the text is lost or not ? I'm wandering may be it's something to do with the way HttpConduit handles empty post requests... thanks > WebClient POST to a resource that returns 401 returns a blank InputStream when there's supposed to be text > ---------------------------------------------------------------------------------------------------------- > > Key: CXF-3304 > URL: https://issues.apache.org/jira/browse/CXF-3304 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.3.2 > Environment: JDK 1.6 > Reporter: Jason Downey > Priority: Minor > Fix For: 2.3.3 > > Attachments: cxf_jax_rs_post_401_bug.zip, cxf_jax_rs_post_401_bug_httpurlconnection.zip > > > I have two methods that return the same error message upon POST. The only difference is that one returns a 404 response status, the other returns a 401 response status. > POSTing to the resource that returns 404 returns an InputStream containing the error message when you call Response.getEntity(). However, POSTing to the resource that returns 401 returns a blank InputStream when you call Response.getEntity(). > This problem was not reproducible with GET. > Test case code attached. Launch the server using JettyServer. Then run the WebClient test in WebClientTest. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira