Changeset 23e807a144fa1f89d334518ea4a32eacfe154008

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

[201e9d3d678bc8669cead70a8c52df2da7aa0585]

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

check for valid read_limit

Files:

Legend:

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

    r09fef40 r23e807a  
    132132function te_length(self, content_enc_func, read_limit) 
    133133    local len = tonumber(self.headers["content-length"]) 
    134     if read_limit > 0 and len > read_limit then 
     134    if read_limit and read_limit > 0 and len > read_limit then 
    135135      len = read_limit 
    136136    end 
     
    164164        self.content_bytes = self.content_bytes + string.len(decoded) 
    165165        if self.hooks.consume ~= nil then self.hooks.consume(decoded) end 
    166         if read_limit > 0 then 
     166        if read_limit and read_limit > 0 then 
    167167          if string.len(self.content_bytes) > read_limit then 
    168168            return