A
Asterbing
I thought the whole point was to avoid extracting the
data in the first place.
Right Effectively, I've taken an example of 1MB limit, but it could
be 10MB (or 10KB but it's another discussion). So, if it's 10MB and
client send CONTENT_LENGTH in its request (which is not always the
case), I would like to check it, then deduct the file size and stop
everything in case of limitation overflow.
You have enough memory to load a 1 MB of non-file-upload form-data into
memory, but not enough disk to temporarily save 1 MB of file-upload data?
That just doesn't make sense.
See what I say just above
Having said that, you could hack/subclass the read_multipart method
of CGI.pm to have it, at a certain size, stop copying the data into the
file, something like:
So, here, I understand CGI.pm stop the things during file server
copying, not about STDIN fill-in