Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-579

404 should be thrown instead of 405

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 2.2.2.GA
    • 2.2.1
    • None
    • None

    Description

      For this:
      @Path("/secured")
      public static class BaseResource
      {
      public String get(@Context SecurityContext ctx)
      {
      System.out.println("********* IN SECURE CLIENT");
      if (!ctx.isUserInRole("admin"))

      { System.out.println("NOT IN ROLE!!!!"); throw new WebApplicationException(401); }

      return "hello";
      }

      @GET
      @Path("/authorized")
      @RolesAllowed("admin")
      public String getAuthorized()

      { return "authorized"; }

      }

      If you try to do a GET /secured you get a 405 instead of a 404 error.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            patriot1burke@gmail.com Bill Burke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: