diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 32582b6d872..56c23102f32 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -74,6 +74,9 @@ Release 0.23.1 - UNRELEASED HDFS-2590. Fix the missing links in the WebHDFS forrest doc. (szetszwo) HDFS-2596. TestDirectoryScanner doesn't test parallel scans. (eli) + + HDFS-2606. webhdfs client filesystem impl must set the content-type + header for create/append. (tucu) Release 0.23.0 - 2011-11-01 diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java index d10e70888ec..7b7f20b12d8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java @@ -357,6 +357,7 @@ private HttpURLConnection httpConnect(final HttpOpParam.Op op, final Path fspath conn.setRequestMethod(op.getType().toString()); if (op.getDoOutput()) { conn = twoStepWrite(conn, op); + conn.setRequestProperty("Content-Type", "application/octet-stream"); } conn.setDoOutput(op.getDoOutput()); conn.connect();