[PATCH] Increase maximum length of http response buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-02-10 at 23:02 +0100, Adam Pi?tyszek wrote:
> 
> It seems that my company upgraded the CSD trojan on their VPN
> gateways,
> becasue I got the following error message from openconnect:
> 
>   Response body too large for buffer (141075 > 131072)
> 
> This patch fixes the problem for me, so please consider applying it
> onto your master branch. 

Hm, the ideal reaction to such problems is not just to increase the
limit, but to remove it by doing some kind of realloc()...

With HTTP chunked encoding or Content-Length, that's actually quite
simple to cope with. It's only HTTP 1.0 read-till-it-closes that really
poses a problem, and even then it's not much of one -- you just use
read() in a loop, reading a fixed size each time and reallocating each
time. (Or doubling in size each time, perhaps).

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux