jrialland / ajp-client

Java implementation of an AJP13 protocol client (aka Apache JServ), allowing to send requests to a servlet container using this protocol.
Apache License 2.0
30 stars 7 forks source link

Fix the req_attribute to send 2 strings, and allow multiple req_attribute in the request. #2

Closed pmoerenhout closed 6 years ago

pmoerenhout commented 6 years ago

I use the ajp_client to send requests to my Spring Boot application with Embedded Tomcat. I wanted to use the AJP_LOCAL_ADDR, AJP_REMOTE_PORT and AJP_SSL_PROTOCOL attribute with some values. For the req_attribute (0x0A) attribute, the value is actually 2 strings. The first is the name, the second is the value. I renamed the Attribute to AttributeType, and refactored the Map to a List of Attribute objects. Then the code worked to the Tomcat AJP/1.3 connector and the remote port, and localaddress are available in the servlet request.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.2%) to 77.45% when pulling 4540c52f960e178f1e9d15d89b32bdb680ce92ac on pmoerenhout:master into 14f7064290833f2038a3a05f3c5cd6ab2e04b6a2 on jrialland:master.

pmoerenhout commented 6 years ago

Thanks!