Uploaded image for project: 'ROME Incubator'
  1. INCUBATOR-5

[certiorem] Setting of Host / Port request properties on HttpURLConnection unnecessary

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-M1
    • Labels:
      None
    • Sprint:

      Description

      A few places in code sets request properties like Host and Port on HttpURLConnection when they are not needed.
      In at least one place Host is set and port is not which creates an incorrect request resulting in errors like:

      12:06:20,337 TRACE HubSubscriberResource:78 - doGet: Hub verifying with Subscriber mode: subscribe topic: http://localhost:9070/xyz
      Oct 27, 2011 12:06:20 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
      SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
      org.rometools.certiorem.HttpStatusCodeException: Not a valid callback prefix.
              at org.rometools.certiorem.sub.Subscriptions.validate(Subscriptions.java:216)
              at xyz.HubSubscriberResource.doGet(HubSubscriberResource.java:82)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
      Caused by: java.lang.Exception: http://localhost/xyz/rest/pubsub/subscriber/9ba6f787-4cde-4705-b017-671dff61eb46 doesnt start with http://localhost:9090/xyz/rest/pubsub/subscriber/
              ... 44 more
      Oct 27, 2011 12:06:20 PM org.glassfish.grizzly.servlet.ServletHandler doServletService
      SEVERE: service exception:
      org.rometools.certiorem.HttpStatusCodeException: Not a valid callback prefix.
              at org.rometools.certiorem.sub.Subscriptions.validate(Subscriptions.java:216)
      
      

        Attachments

          Activity

            People

            • Assignee:
              farrukh_najmi Farrukh Najmi
              Reporter:
              farrukh_najmi Farrukh Najmi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: