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

MockHttpRequest returns invalid UriInfo object

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 2.0.1.GA, 2.1.0.GA, 2.2.0.GA, 2.2.1
    • 2.3-beta-1
    • jaxrs
    • None
    • Compatibility/Configuration
    • Workaround Exists
    • Hide

      (1) create a subclass of MockHttpRequest
      (2) copy method MockHttpRequest#create(String, URI, URI) to the subclass
      (3) correctly reimplement initWithUri(URI, URI) in the subclass
      Almost all issues except the fragment handling issue can be fixed that way (Fragment handling is broken in UriInfoImpl).

      Show
      (1) create a subclass of MockHttpRequest (2) copy method MockHttpRequest#create(String, URI, URI) to the subclass (3) correctly reimplement initWithUri(URI, URI) in the subclass Almost all issues except the fragment handling issue can be fixed that way (Fragment handling is broken in UriInfoImpl ).

    Description

      When a MockHttpRequest object is created via static create method, it is initialized with an invalid UriInfo object. More concrete, the following UriInfo features are broken:
      getAbsolutePath() does not exclude query parameters and fragment.
      getPath() is not correctly relativized against the base URI.
      getRequestURI() contains the query part twice.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: