[Twisted-web] URL length limits in twisted-web

Tommi Virtanen tv at twistedmatrix.com
Thu Aug 25 03:28:11 MDT 2005

Lenny G Arbage wrote:
> I'm noticing silent failures using HTTPClientFactory
> with len(url) >= 16400.  The factory's deferred object
> immediately calls its associated callBack() method
> without sending any data  (the server is likewise
> written with twisted python, but it doesn't appear to
> ever receive data).  The errorBack() doesn't fire
> either.
> A url with len <= 16398 works just fine, firing the
> callback /after/ sending the data.
> According to RFC 2616, arbitrary length URLs are
> allowed by HTTP, but I understand that there are
> practical limitations in many implementations.  Is the
> 16400 url-length ceiling a known limitation in
> twisted, or am I banging up against something else?

There's this DoS-avoidance bit:

class LineReceiver(protocol.Protocol, _PauseableMixin):
    MAX_LENGTH = 16384

More information about the Twisted-web mailing list