mod_uwsgi with chunked request body causes 411

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 127.0.0.1:2001), 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:

 

http://www.gossamer-threads.com/lists/apache/users/183271

“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://127.0.0.1:2101/

 

Uwsgi invocation:

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

 

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.

 

Thanks,

 

Steve

 

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux