Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 63752 invoked from network); 7 Jan 2008 22:15:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2008 22:15:03 -0000 Received: (qmail 27949 invoked by uid 500); 7 Jan 2008 22:14:52 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 27917 invoked by uid 500); 7 Jan 2008 22:14:52 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 27908 invoked by uid 99); 7 Jan 2008 22:14:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 14:14:52 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 22:14:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AF7F1714236 for ; Mon, 7 Jan 2008 14:14:34 -0800 (PST) Message-ID: <15977589.1199744074715.JavaMail.jira@brutus> Date: Mon, 7 Jan 2008 14:14:34 -0800 (PST) From: "Roland Weber (JIRA)" To: dev@hc.apache.org Subject: [jira] Closed: (HTTPCORE-137) Problem handling HTTP PUT requests In-Reply-To: <13132936.1199737354056.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCORE-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roland Weber closed HTTPCORE-137. --------------------------------- Resolution: Invalid Please fix this condition in your code: if (method.equals("HEAD") || method.equals("PUT")) { System.out.println("Processing PUT request..."); > Problem handling HTTP PUT requests > ----------------------------------- > > Key: HTTPCORE-137 > URL: https://issues.apache.org/jira/browse/HTTPCORE-137 > Project: HttpComponents Core > Issue Type: Bug > Components: HttpCore NIO > Affects Versions: 4.0-rc1 > Environment: Java JDK 1.6.0_03 on Windows XP Service Pack 2 > Reporter: Ronald E Johnson > Attachments: TestHTTPServer.java > > > I have a Java Swing application with an HttpServer() instance running in a SwingWorker thread. I'm able to get at the HTTP GET requests by casting the request as follows: > if (request instanceof HttpEntityEnclosingRequest) { > HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity(); > byte[] entityContent = EntityUtils.toByteArray(entity); > logger.info("Incoming entity content (bytes): " + entityContent.length); > } > However this does not work for PUT requests. In fact printing out the request line of a PUT request appears as: "HEAD /test.txt HTTP/1.1", and I don't see PUT in the request line at all. Attempting to cast this as an HttpEntityEnclosingRequest fails, and thus I'm not able to get at the HttpEntity. Is this functionality supported? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org