Comments (11)
Automation removed owner |
---|
from twisted.
@itamarst commented |
---|
#!html
<pre>
Glyph and DP tell me Quotient has code that does this, but it's hacky. Possibly
we could do this at pycon.
</pre>
from twisted.
@itamarst commented |
---|
#!html
<pre>
This depends on distrib refactor, which is why I had to back
this out from 0.99.7 or whenever I did it originally.
Benefits would be not storing 20MB uploaded files in memory,
and a few other things which prevent DoS attacks.
</pre>
from twisted.
@radix commented |
---|
#!html
<pre>
i keep hearing that twisted caches uploaded files in
memory, but every time I go look at the http code, it
seems that this is wrong. Here is the code:
if length < 100000:
self.content = StringIO()
else:
self.content = tempfile.TemporaryFile()
where "length" is the Content-length that the client has
sent. So what's the deal?
</pre>
from twisted.
@itamarst commented |
---|
#!html
<pre>
That's because you keep looking at the wrong code ;)
The relevant line is:
cgi.parse_multipart(self.content, pdict)
</pre>
from twisted.
@itamarst commented |
---|
#!html
<pre>
glyph points out that FieldStorage blocks, which is no good.
So we're going to have to write our own solution.
</pre>
from twisted.
@glyph commented |
---|
#!html
<pre>
Feel like doing some web programming?
</pre>
from twisted.
@itamarst commented |
---|
#!html
<pre>
To rephrase:
1. Store large uploaded files on disk.
2. Don't lose metadata like filename and mimetype which are
still available.
3. Default API for accessing files would be as file-like
objects.
3. Backwards compatability - there is code that expects
files to be strings. should work, while still not actually
storing them as strings in memory until the users actually
do this (mmap, maybe? they look kinda like strings.)
</pre>
from twisted.
@moshez commented |
---|
#!html
<pre>
instead of using mmap, I'd prefer using magical __getattr__ code
which would create these attributes by reading in the files.
</pre>
from twisted.
@jyknight commented |
---|
#!html
<pre>
So I think this is basically waiting for someone to rewrite cgi.parse_multipart in a way that can be fed
incremental data.
</pre>
from twisted.
@jyknight commented |
---|
#!html
<pre>
I did this a while back: twisted.web2.fileupload
</pre>
from twisted.
Related Issues (20)
- Continued Use of Insecure Default Parameters HOT 8
- Deprecation of SSH ciphers HOT 1
- t.c.ssh.channel.SSHChannel.write has no limit to the buffer
- t.c.ssh.filetransferserver.FileTransferServer.packet_READ with unhandled error
- type confusion in KnownHosts.verifyHostKey traceback when adding ip key
- Compiled version of DelayedCall
- Change documentation for optional dependency SOAPpy to SOAPpy-py3 HOT 6
- Remove the soap code
- `twisted.internet.test.test_tcp.AbortConnectionTests_*Tests.test_fullWriteBuffer` test timeout on macOS HOT 13
- TwistedWeb ReverseProxyResource example has string not bytes as third argument
- Setup benchmarks using Codspeed.io HOT 6
- Speed up twisted.web server, part 2 of N
- Deprecate t.w.h.HTTPClient HOT 4
- t.w.h.HTTPClient parses Content-Length laxly HOT 1
- disttrial / `trial -j` should support debug prints
- `twisted.python.test.test_sendmsg.SendmsgTests.test_sendSubProcessFD` is flaky HOT 2
- Deprecation docs should use NEXT placeholders
- Improve defer.inlineCallbacks tests
- twisted.web generates deprecation warnings internally HOT 3
- Expand benchmarks to run on PyPy as well HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twisted.