Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E99BE33E for ; Tue, 12 Mar 2013 20:59:16 +0000 (UTC) Received: (qmail 77018 invoked by uid 500); 12 Mar 2013 20:59:14 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 76911 invoked by uid 500); 12 Mar 2013 20:59:14 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 76734 invoked by uid 99); 12 Mar 2013 20:59:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 20:59:14 +0000 Date: Tue, 12 Mar 2013 20:59:14 +0000 (UTC) From: "Arpit Gupta (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-4594) WebHDFS open sets Content-Length header to what is specified by length parameter rather than how much data is actually returned. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Arpit Gupta created HDFS-4594: --------------------------------- Summary: WebHDFS open sets Content-Length header to what is specified by length parameter rather than how much data is actually returned. Key: HDFS-4594 URL: https://issues.apache.org/jira/browse/HDFS-4594 Project: Hadoop HDFS Issue Type: Bug Affects Versions: 2.0.3-alpha Reporter: Arpit Gupta This was noticed on 2.0.3 alpha Lets say we have a file of length x We make an webhdfs open call specifying length=x+1 The response of the call redirected to the datanode sets the content length header to value x+1 rather than x. Now this causes an error when the client tries to read the data. For the test i was using HttpResponse.getEntity().getContent() This failed with message "Premature end of Content-Length delimited message body (expected: 71898; received: 71897" This was not seen in hadoop 1 as we did not set the content length header. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira