Answer the question
In order to leave comments, you need to log in
Apache and POST request without Content-Length?
Hello.
The Apache web server does not want to skip the body of a POST request if there is no Content-Length in the request header. The fact is that the client uses Apache Axis2, which, as far as I understand from the dug up information in Google, does not transmit the above header. Accordingly, the XML document transmitted by the client in the body of the POST request does not go further than the web server, although all request headers are successfully transmitted further. I tried to send "Transfer-Encoding: chunked" in the request header, but it did not help. Can you suggest how to solve this problem? Is it possible to somehow tell the web server that such requests should be skipped completely?
The Apache web server version 2.2.16 on Debian Squeeze is used. All data is transmitted over HTTPS.
Answer the question
In order to leave comments, you need to log in
Thanks everyone, it turned out to be really a problem in FastCGI. I configured mod_php and it worked. It's just that all the other hosts on this server are spinning through FastCGI and did not think that there could be troubles with it.
As a solution, put a web accelerator in front of Apache that is able to accept such a request, and then forward its Apache with this header. I can’t specify a specific proxy - I haven’t encountered such a problem, I have to try. Perhaps nginx, haproxy, varnish, squid…
How do you think the web server should know where the request body ends without Content-Length or chunked encoding?
Right now he asked me to send a real request and looked at the logs generated by mod_security. According to the logs, everything seems to be correct and everything passes.
try to remove chunked programmatically in code:
Options option = client.getOptions();
option.setProperty(HTTPConstants.CHUNKED,false);
here are examples:
wso2.org/library/209
www.herongyang.com/WSDL/Java-Axis2-141-Turn-Off-Chunked-HTTP-Flag.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question