Changeset 220f29f3f3e69addb451afcb396087f4e18a931f

Show
Ignore:
Timestamp:
04/21/10 01:01:56 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1271811716 +0000
git-parent:

[a719cb681d36678e18a208f35dc8058c4beb1e32]

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

allow reuse, we need to allow for nilled out headers and resetting the content-length

Files:

Legend:

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

    r0125b25 r220f29f  
    6464    self.content_bytes = 0 
    6565    self.e:write(method .. " " .. uri .. " " .. "HTTP/1.1\r\n") 
     66    headers["Content-Length"] = nil 
    6667    if payload ~= nil and string.len(payload) > 0 then 
    6768      headers["Content-Length"] = string.len(payload) 
     
    7273    end 
    7374    for header, value in pairs(headers) do 
    74       self.e:write(header .. ": " .. value .. "\r\n") 
     75      if value ~= nil then self.e:write(header .. ": " .. value .. "\r\n") end 
    7576    end 
    7677    self.e:write("\r\n")