[ https://issues.apache.org/jira/browse/HDFS-13064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brahma Reddy Battula updated HDFS-13064: ---------------------------------------- Target Version/s: 3.4.0 (was: 3.3.0) Bulk update: moved all 3.3.0 non-blocker issues, please move back if it is a blocker. > Httpfs should return json instead of html when writting to a file without > Content-Type > -------------------------------------------------------------------------------------- > > Key: HDFS-13064 > URL: https://issues.apache.org/jira/browse/HDFS-13064 > Project: Hadoop HDFS > Issue Type: Improvement > Components: httpfs > Affects Versions: 3.0.0 > Reporter: fang zhenyi > Assignee: fang zhenyi > Priority: Minor > Attachments: HDFS-13064.001.patch, HDFS-13064.002.patch > > > When I create a hdfs file, I get the following response. > > {code:java} > zdh102:~ # curl -i -X PUT > "http://10.43.183.103:14000/webhdfs/v1/2.txt?op=CREATE&user.name=hdfs&data=true" > HTTP/1.1 400 Bad Request > Server: Apache-Coyote/1.1 > Set-Cookie: > hadoop.auth="u=hdfs&p=hdfs&t=simple&e=1516901333684&s=wYqDlu/ovRxay9d6I6UmoH77KKI="; > Path=/; Expires= , 25- -2018 17:28:53 GMT; HttpOnly > Content-Type: text/html;charset=utf-8 > Content-Language: en > Content-Length: 1122 > Date: Thu, 25 Jan 2018 07:28:53 GMT > Connection: close > <html><head><title>Apache Tomcat/7.0.82 - Error report</title><style><!--H1 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} > H2 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} > H3 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} > BODY > {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P > {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A > {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> > </head><body><h1>HTTP Status 400 - Data upload requests must have > content-type set to 'application/octet-stream'</h1><HR size="1" > noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Data > upload requests must have content-type set to > 'application/octet-stream'</u></p><p><b>description</b> <u>The request sent > by the client was syntactically incorrect.</u></p><HR size="1" > noshade="noshade"><h3>Apache Tomcat/7.0.82</h3></body></html>zdh102:~ # > {code} > > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org