We're updating the issue view to help you get more done. 

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

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:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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)

Environment

None

Status

Assignee

Farrukh Najmi

Reporter

Farrukh Najmi

Labels

None

Participants

None

Fix versions

Priority

Major