Show
Ignore:
Timestamp:
10/31/11 18:02:35 (2 years ago)
Author:
Ryan Phillips <ryan.phillips@rackspace.com>
git-committer:
Ryan Phillips <ryan.phillips@rackspace.com> 1320084155 -0500
git-parent:

[82dc7d35bbaadf8d6f995fa74cd2135e6764188d]

git-author:
Ryan Phillips <ryan.phillips@rackspace.com> 1319727021 -0500
Message:

add 100k limit to http read lengths

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules-lua/noit/HttpClient.lua

    r801a7a7 rf598232  
    132132function te_length(self, content_enc_func) 
    133133    local len = tonumber(self.headers["content-length"]) 
     134    len = len > 102400 and 102400 or len 
    134135    repeat 
    135136        local str = self.e:read(len) 
     
    164165        str = self.e:read("\n") 
    165166        if str ~= "\r\n" and str ~= "\n" then error("short chunked boundary read") end 
     167        if string.len(self.content_bytes) > 102400 then 
     168          break 
     169        end 
    166170    end 
    167171    -- read trailers