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

Masatake Iwasaki commented on HADOOP-15984:
-------------------------------------------

{quote}
Now I cannot find a way to enable HDFS-14423 in Jersey 2.x
{quote}

[~aajisaka] NamenodeWebHdfsMethods is getting path by {{PathParam}} like

{noformat}
  @GET
  @Path("{" + UriFsPathParam.NAME + ":.*}")
  ...
  public Response get(
      ...
      @PathParam(UriFsPathParam.NAME) final UriFsPathParam path,
{noformat}

Jersey 2 seems to remove matrix params always on getting the value of PathParam.
https://github.com/eclipse-ee4j/jersey/blob/2.30.1/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/SingleMatchResult.java#L39

{{UriInfo}} could be used for getting path containing semicolon like

{noformat}
@Path("")
public class MyResource {
  @GET
  @Path("{path:.*}")
  @Produces(MediaType.TEXT_PLAIN)
  public String getIt(@PathParam("path") String path,
                      @Context UriInfo uriinfo) {
    StringBuilder sb = new StringBuilder();
    sb.append("PathParam: ").append(path).append("\n");
    sb.append("UriInfo: ").append(uriinfo.getPath()).append("\n");
    return sb.toString();
  }
}
{noformat}

(You can run the sample by the way described in [Jersey 
doc|https://eclipse-ee4j.github.io/jersey.github.io/documentation/2.30.1/getting-started.html])

{noformat}
$ curl 'localhost:8080/foo/bar;baz?key=val'
PathParam: foo/bar
UriInfo: foo/bar;baz
{noformat}

> Update jersey from 1.19 to 2.x
> ------------------------------
>
>                 Key: HADOOP-15984
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15984
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Akira Ajisaka
>            Priority: Critical
>
> jersey-json 1.19 depends on Jackson 1.9.2. Let's upgrade.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to