[
https://issues.apache.org/jira/browse/KNOX-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003979#comment-14003979
]
ASF subversion and git services commented on KNOX-381:
------------------------------------------------------
Commit 42dfaaee51b3f75849a0205927824b4812085bcb in knox's branch
refs/heads/master from [~kevin.minder]
[ https://git-wip-us.apache.org/repos/asf?p=knox.git;h=42dfaae ]
KNOX-381: Expansion of authority only URL should not be prefixed with //
> Expansion of authority only URL should not be prefixed with //
> --------------------------------------------------------------
>
> Key: KNOX-381
> URL: https://issues.apache.org/jira/browse/KNOX-381
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 0.4.0
> Reporter: Kevin Minder
> Assignee: Kevin Minder
> Fix For: 0.5.0
>
>
> The problem is that this template
> {code}
> {host}:{port}
> {code}
> we expanded to this
> {code}
> //test-host:777
> {code}
> The goal of the URL Template/Rewriter/Expander is to produce an output that
> is exactly like the input even if they syntax isn't strictly correct for
> URLs. Below is a test the reproduces the issue.
> {code}
> @Test
> public void testHostAndPortOnlyExpansionBugKnox381() throws Exception {
> String text = "{host}:{port}";
> Template template = Parser.parse( text );
> MockParams params = new MockParams();
> params.addValue( "host", "test-host" );
> params.addValue( "port", "777" );
> URI expanded = Expander.expand( template, params, null );
> assertThat( expanded.toString(), equalTo( "test-host:777" ) ) ;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)