hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2428) webhdfs api parameter validation should be better
Date Wed, 12 Oct 2011 19:05:12 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126048#comment-13126048
] 

Tsz Wo (Nicholas), SZE commented on HDFS-2428:
----------------------------------------------

Manually tested it.

{noformat}
$curl -i -X PUT -L "http://localhost:50070/webhdfs/foo/a.patch?op=CREATE&permission=955&overwrite=false&bufferSize=4096&blockSize=33554432&user.name=szetszwo"
-T a.patch
HTTP/1.1 100 Continue

HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=utf-8
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Set-Cookie: hadoop.auth="u=szetszwo&p=szetszwo&t=simple&e=1318482179911&s=wOzQ4NVX5TtJXUfKSdQ4n/jAjJg=";Path=/
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)

{"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException",
"message":"Invalid value for webhdfs parameter \"permission\": For input string: \"955\""}}
{noformat}
                
> webhdfs api parameter validation should be better
> -------------------------------------------------
>
>                 Key: HDFS-2428
>                 URL: https://issues.apache.org/jira/browse/HDFS-2428
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.20.205.0
>            Reporter: Arpit Gupta
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h2428_20111011.patch, h2428_20111011_0.20s.patch
>
>
> PUT Request: http://localhost:50070/webhdfs/some_path?op=MKDIRS&permission=955
> Exception returned
> HTTP/1.1 500 Internal Server Error
> {"RemoteException":{"className":"com.sun.jersey.api.ParamException$QueryParamException","message":"java.lang.NumberFormatException:
For input string: \"955\""}} 
> We should return a 400 with appropriate error message

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message