Ticket #4229 defect new
twisted.web does not handle urls over 16384
|Reported by:||throwawayaccountr4234||Owned by:||throwawayaccountr4234|
Description (last modified by thijs) (diff)
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.