Message817

Author gbgbgb50
Recipients
Date 2003-10-05.14:11:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=866995

The problem here is the different filehandling systems from
C and Java:
The method "make_file" of the class FieldStorage (used for
multipart cgi-data) creates a temp-file with the desired
functionality on cpython. On Jython this seems not to work
correctly.

My proposal is to use cStringIO instead:

def make_file(self, binary=None):
    import cStringIO
    return cStringIO.StringIO()

Here the complete Multipartdata is stored in memory instead
of /tmp/. In my opinion this is more elegant since
main-memory is not a big issue.


History
Date User Action Args
2008-02-20 17:17:13adminlinkissue678557 messages
2008-02-20 17:17:13admincreate