hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fang zhenyi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-13064) Httpfs should return json instead of html when writting to a file without Content-Type
Date Thu, 25 Jan 2018 07:32:00 GMT

     [ https://issues.apache.org/jira/browse/HDFS-13064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

fang zhenyi updated HDFS-13064:
-------------------------------
    Description: 
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}
 

 

> 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
>
> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message