Hi,

I have checked twisted.web.http.HTTPChannel and I see that it limits the
headers by number and not by size.

https://github.com/twisted/twisted/blob/trunk/twisted/web/http.py#L1596

Maybe I don't see the big picture, but wouldn't this allow the server to
load in memory a request with a single header of 1G ?

Other than changing the HTTPChannel.lineReceived() implementation, is there
a way to limit header size?

I did a quick test and the server accepted an 1M cookie value without any
problem.

curl --cookie cookies.txt http://localhost:8080
cookies.txt in in this format https://gist.github.com/adiroiban/8557725

It this a feature or a bug?

Many thanks!
-- 
Adi Roiban
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to