MULE-8018: Merge http connector code cleanup

The other methods are self-explanatory, but I'm not sure what this does..can we add some javadoc?