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

Gera Shegalov commented on YARN-1728:
-------------------------------------

This must have something to do with how Jetty web container interprets 
percent-encoding RFC.  The node id is resolved out of 
[getPathInfo|http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html#getPathInfo()],
 which does the decoding. [Section 
2.4|http://tools.ietf.org/html/rfc3986#section-2.4] says 
   {quote}"Implementations must not
   percent-encode or decode the same string more than once, as decoding
   an already decoded string might lead to misinterpreting a percent
   data octet as the beginning of a percent-encoding, or vice versa in
   the case of percent-encoding an already percent-encoded string."{quote}

Thus it would be incorrect to attempt decoding once again. On the other hand, 
since ':' has no special meaning for the path component unlike '/', Jetty might 
have chosen not to interpret %3A .



> History server doesn't understand percent encoded paths
> -------------------------------------------------------
>
>                 Key: YARN-1728
>                 URL: https://issues.apache.org/jira/browse/YARN-1728
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Abraham Elmahrek
>
> For example, going to the job history server page 
> http://localhost:19888/jobhistory/logs/localhost%3A8041/container_1391466602060_0011_01_000001/job_1391466602060_0011/admin/stderr
>  results in the following error:
> {code}
> Cannot get container logs. Invalid nodeId: 
> test-cdh5-hue.ent.cloudera.com%3A8041
> {code}
> Where the url decoded version works:
> http://localhost:19888/jobhistory/logs/localhost:8041/container_1391466602060_0011_01_000001/job_1391466602060_0011/admin/stderr
> It seems like both should be supported as the former is simply percent 
> encoding.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to