Hello han zheng:

> When I saw the logging information, I saw a string "fdopen" when I "print" 
> the req.content. So what is the meaning of the "fdopen" ?

"fdopen" is a Python library type:

http://docs.python.org/3/library/os.html?highlight=fdopen#os.fdopen

I believe the LAFS gateway is storing the uploaded data, if it is
large enough, in a temporary file on disk instead of in RAM. Here is
the code in the Twisted HTTP server that does that:

http://twistedmatrix.com/trac/browser/trunk/twisted/web/http.py?annotate=blame&rev=36410#L667

It looks like (with current HEAD of Twisted) it does this if the
request body is >= 100,000 bytes.

The Python standard library "tempfile" module that Twisted uses
produces things whose description includes "fdopen":

http://docs.python.org/3/library/tempfile.html

Regards,

Zooko
_______________________________________________
tahoe-dev mailing list
tahoe-dev@tahoe-lafs.org
https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev

Reply via email to