Apache Mod-Python - Further file upload limits and content-length issues in mod_python.

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > April 2005 > Further file upload limits and content-length issues in mod_python.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Further file upload limits and content-length issues in mod_python.
Barry Pearce

2005-04-19, 2:45 am

Hi all,

Well I have been ivestigating things further - It looks like my last set
of changes got us to 2GB as a content-length. However this seems to be
where it stops....namely i have noticed that this appears to be because
of faults in the code which restricts content length to 32bit.

To start:

util.py ~ line 112 should not use int() to convert in Python but should
use long():

try:
clen = long(req.headers_in["content-length"])
except (KeyError, ValueError):
# absent content-length is not acceptable
raise apache.SERVER_RETURN, apache.HTTP_LENGTH_REQUIRED

This appears to be the only problem here. Any content > 2GB results in
BAD_REQUEST being sent to the client. The faults appear to reside in the
C code which constantly declare size for content-length using long
rather than something more appropriate such as 'long long'.

Im now investigating further...

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com