AJP client code extracted from Tomcat