Python cgi FieldStorage slow alternatives?

I have a python cgi script that receives files downloaded via an http message. Files can be large (300+ MB). The fact is that cgi.FieldStorage () is incredibly slow to get the file (300 MB of the file took 6 minutes to be "received"). Doing the same, just reading stdin, took about 15 seconds. The problem with the latter is that I have to analyze the data myself if there are several fields that are sent.

Are there any faster alternatives to FieldStorage ()?

+3
source share
1 answer

"[I] must analyze the data himself"

? CGI , .

.

StringIO. , .

cgi.parse(mylocalfile).

+2

Source: https://habr.com/ru/post/1708885/


All Articles