1

After migrating an existing webapp from DropWizard to latest Quarkus (3.1, resteasy-reactive), things are working well except for some edge cases we have found. One in particular looks like possible bug: handling of URL path parameters wrt decoding of percent-encoded entities. We noticed that end point like:

@ApplicationScoped
@Path("/path")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class PathResource
{
    @GET
    @Path("/list/{primaryKey: .+}")
    public String pathAsList(@PathParam("primaryKey") List<PathSegment> path)
    {
    }

will, given URL like:

http://localhost:8081/path/list/ab%2Fcd/ef%2Fgh

produce different List when run using "quarkus-resteasy" and "quarkus-resteasy-reactive":

  • With blocking (quarkus-resteasy) we get List of 2 segments: "ab/cd" and "ef/gh"
  • With reactive we get List of 4 segments: "ab", "cd", "ef" and "gh"

of these former is, I think, correct; and is what DropWizard (Jersey) also does.

I will file an issue against Quarkus but was hoping to see if anyone knew more about this discrepancy, possibly having a work-around or something.

StaxMan
  • 113,358
  • 34
  • 211
  • 239

0 Answers0