Fixed the issue with malformed legacy http requests would return no http response at all

Also added tests and specified java version in pom.xml