[Python-modules-team] Bug#622730: libapache2-mod-wsgi: [PATCH] support setting a >2GB Content-Length header
Nicolas Noirbent
nicolas at noirbent.fr
Thu Apr 14 09:15:15 UTC 2011
Package: libapache2-mod-wsgi
Version: 3.3-2
Severity: normal
Tags: patch
Hello,
When a WSGI application sets a Content-Length header to a value
greater than 2GB, mod_wsgi errors out with the following line in error.log:
[Thu Apr 14 09:08:02 2011] [error] [client 192.168.0.16] ValueError: invalid content length
This is due to the use of strtol() instead of strtoll() when
extracting the Content-Length from the headers provided by the WSGI
application.
I'm attaching a patch that fixes the issue by using strtoll() and an
apr_off_t instead.
Regards,
-- System Information:
Debian Release: wheezy/sid
APT prefers oldstable
APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_apr_off_t_for_content_length
Type: text/x-diff
Size: 714 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20110414/1c4e1212/attachment.diff>
More information about the Python-modules-team
mailing list