0
votes

Two almost the same Jersey endpoints, one with query parameters the other without. Both work well on Docker Apache with HTTP. But when turn on Apache HTTPS, the one without parameter cannot be reached at all, while the one with the parameters works. There is a filter be called before the endpoint code is reached, in the HTTPS case, the filter is not hit for the call to the endpoint without the parameters. Had searched a lot but no clue what happened. What's problem and at least how to check.

// with @QueryParam works with HTTPS
@GET
@Path("/a")
@Produces({ MediaType.APPLICATION_JSON})
@Operation(summary="GET with parameters", description="GET with parameters.", tags={"test"},
        responses={@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON, 
        array=@ArraySchema(schema=@Schema(implementation=User.class))))})
public Response getA( 
        @HeaderParam(HEADER_AUTHORIZATION) String auth,
        @QueryParam("username") String username,
        @QueryParam("fname") String fname,
        @QueryParam("lname") String lname) 
{ ... }

// without any parameters NOT working with HTTPS
@GET
@Path("/b")
@Produces({ MediaType.APPLICATION_JSON})
@Operation(summary="GET with parameters", description="GET with parameters.", tags={"test"},
        responses={@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON, 
        array=@ArraySchema(schema=@Schema(implementation=User.class))))})
public Response getB( 
        @HeaderParam(HEADER_AUTHORIZATION) String auth) 
{ ... }