You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Mars (JIRA)" <ji...@apache.org> on 2017/09/21 01:58:00 UTC
[jira] [Updated] (KNOX-1055) Spark page characters "&" should
be treated as a delimiter
[ https://issues.apache.org/jira/browse/KNOX-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mars updated KNOX-1055:
-----------------------
Description:
I am a beginner of apache knox. When I use knox to proxy my sparkhistoryui, I meet this problem.
<a href="/history/application_1505879554093_0036/stages/stage?id=0{color:#d04437}\&{color}attempt=0" class="name-link">
Some query parameters in the response body of the spark history ui contain a "\&".
org.apache.hadoop.gateway.util.urltemplate.Parser#consumeQueryToken does not handle this case
{code:java}
StringTokenizer tokenizer = new StringTokenizer( token, "?&" );
while( tokenizer.hasMoreTokens() ) {
consumeQuerySegment( builder, tokenizer.nextToken() );
}
{code}
so,I changed the code block as bellows
{code:java}
String[] tokens = token.split("(&|\\?|&)");
if (tokens != null){
for (String nextToken : tokens){
consumeQuerySegment(builder,nextToken);
}
}
{code}
was:
I am a beginner of apache knox. When I use knox to proxy my sparkhistoryui, I meet this problem.
<a href="/history/application_1505879554093_0036/stages/stage?id=0{color:#d04437}&{color}attempt=0" class="name-link">
Some query parameters in the response body of the spark history ui contain a "&".
org.apache.hadoop.gateway.util.urltemplate.Parser#consumeQueryToken does not handle this case
{code:java}
StringTokenizer tokenizer = new StringTokenizer( token, "?&" );
while( tokenizer.hasMoreTokens() ) {
consumeQuerySegment( builder, tokenizer.nextToken() );
}
{code}
so,I changed the code block as bellows
{code:java}
String[] tokens = token.split("(&|\\?|&)");
if (tokens != null){
for (String nextToken : tokens){
consumeQuerySegment(builder,nextToken);
}
}
{code}
> Spark page characters "&" should be treated as a delimiter
> --------------------------------------------------------------
>
> Key: KNOX-1055
> URL: https://issues.apache.org/jira/browse/KNOX-1055
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Affects Versions: 0.13.0
> Reporter: Mars
> Priority: Trivial
> Labels: easyfix
> Fix For: 0.14.0
>
>
> I am a beginner of apache knox. When I use knox to proxy my sparkhistoryui, I meet this problem.
> <a href="/history/application_1505879554093_0036/stages/stage?id=0{color:#d04437}\&{color}attempt=0" class="name-link">
> Some query parameters in the response body of the spark history ui contain a "\&".
> org.apache.hadoop.gateway.util.urltemplate.Parser#consumeQueryToken does not handle this case
> {code:java}
> StringTokenizer tokenizer = new StringTokenizer( token, "?&" );
> while( tokenizer.hasMoreTokens() ) {
> consumeQuerySegment( builder, tokenizer.nextToken() );
> }
> {code}
> so,I changed the code block as bellows
> {code:java}
> String[] tokens = token.split("(&|\\?|&)");
> if (tokens != null){
> for (String nextToken : tokens){
> consumeQuerySegment(builder,nextToken);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)