Show
Ignore:
Timestamp:
09/29/09 00:41:23 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1254184883 +0000
git-parent:

[be06bddffbd230aec8cb74a84859977d59173f06]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1254184883 +0000
Message:

fix issues with nil content returns

Files:

Legend:

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

    r2526355 ra1cce74  
    9191    until str == nil or string.len(str) ~= len 
    9292    local decoded = content_enc_func(str) 
    93     self.content_bytes = self.content_bytes + string.len(decoded) 
     93    if decoded ~= nil then 
     94        self.content_bytes = self.content_bytes + string.len(decoded) 
     95    end 
    9496    if self.hooks.consume ~= nil then self.hooks.consume(decoded) end 
    9597end 
  • src/modules-lua/noit/module/http.lua

    r4a67d45 ra1cce74  
    146146    callbacks.consume = function (str) 
    147147        if firstbytetime == nil then firstbytetime = noit.timeval.now() end 
    148         output = output .. str 
     148        output = output .. (str or '') 
    149149    end 
    150150    callbacks.connected = function () connecttime = noit.timeval.now() end