twisted.web does not handle urls over 16384

[email protected] Wed, 20 Jan 2010 13:34:38 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from throwawayaccountr4234 <None>:

When a URL longer then 16K chars is requested to a twisted.web server the server drops the connection.

The reason for this is that the twisted.web server uses protocols.basic.LineReceiver for handling the request and header sections. If the LineReceiver receives a line longer than 16K it simply drops the connection.

While there should probably be max length of the url in the web server, it would be nice to have it properly configurable. Furthermore the server should reply with 414 REQUEST_URI_TOO_LONG if the url is too long.

Our temporary fix have been to raise the MAXLENGTH value in the LineReceiver.

And yes, this is a real problem :-). We query a server for several hundred different states, where interesting states are embedded in the URL.

----------
Type     : defect
Component: web
Keywords : web, url
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4229