httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Pierce <>
Subject [users@httpd] mod_uwsgi with chunked request body causes 411
Date Fri, 06 Sep 2013 03:48:41 GMT
I'm trying to make a PUT/POST HTTP request to a uwsgi application through apache, using the
uwsgi module for apache. These requests use chunked transfer encoding for the request body.

I have some test cases that I can run to make sure that all the functionality works. When
I run them against the uwsgi HTTP socket (--http-socket, everything works
fine. When I run against port 80 (apache), apache seems to give me a '411 Length Required'.
Uwsgi and my application do not report any request at all. I also snooped the backend traffic
between apache and uwsgi, and I don't see traffic.

My application's other functions (ones that don't use PUT/POST with chunked transfer encoding
for the request body) work fine through apache.

Some investigation seems to indicate that the uwsgi module for apache is responsible for disallowing
the requests using a chunked request body:
"Well, I got Apache source and it is obvious that the problem is
most (all?) mod_* things do not ask Apache to dechunk request for
them. They prefer to make it an error. So, it is possible to write Apache
module to allow chunked requests."

My configuration is apache 2.2.15 (stock CentOS 6.0), proxying for uwsgi (my custom package
1.9.37), running my python wsgi application. My apache configuration:

ProxyPass /app/1.0 uwsgi://

Uwsgi invocation:
/usr/sbin/uwsgi --socket --http-socket -A 10 --wsgi-file /usr/local/vf/app/bin/app.wsgi
--processes 10 --snmp= --snmp-community XXXX --daemonize2 /var/log/uwsgi-app
--log-syslog=app --pidfile /var/run/ --http-manage-expect --http-raw-body --chunked-input-limit

I'm hoping that someone on the list can help me determine why I'm getting a 411 , and how
I can fix it. I'd rather not drop using apache.



View raw message