mod_proxy_fcgi doesn't send cgi CONTENT_LENGTH variable when the client request used Transfer-Encoding:chunked

Solution Verified - Updated -

Issue

  • Apache Bug 57087
  • mod_proxy_fcgi doesn't send cgi CONTENT_LENGTH variable when the client request used Transfer-Encoding:chunked

  • Steps to Reproduce:

  1. Install httpd, php-common and php-fpm
  2. Make a test php file
cat << 'EOF' > /var/www/html/test.php
<?php
echo $_SERVER['CONTENT_LENGTH']."\n";
?>
EOF
  1. Run curl commands
$ curl -X POST -d "blablablabla" http://$(hostname)/test.php
12
$ curl -X POST -H "Transfer-Encoding: chunked" -d "blablablabla" http://$(hostname)/test.php
$ 

Environment

  • Red Hat Enterprise Linux 8
  • httpd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content