Explorar o código

Merge -r 1208156:1208157 from trunk to branch. FIXES: HDFS-2606

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1208158 13f79535-47bb-0310-9956-ffa450edef68
Alejandro Abdelnur %!s(int64=13) %!d(string=hai) anos
pai
achega
98b5c7f025

+ 3 - 0
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 
 

+ 1 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java

@@ -357,6 +357,7 @@ public class WebHdfsFileSystem extends FileSystem
       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();