|
@@ -40,7 +40,7 @@ local function receiveheaders(sock, headers)
|
|
|
while line ~= "" do
|
|
|
-- get field-name and value
|
|
|
name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)"))
|
|
|
- if not (name and value) then return nil, "malformed reponse headers" end
|
|
|
+ if not (name and value) then return nil, "malformed response headers" end
|
|
|
name = string.lower(name)
|
|
|
-- get next line (value might be folded)
|
|
|
line, err = sock:receive()
|
|
@@ -67,7 +67,7 @@ socket.sourcet["http-chunked"] = function(sock, headers)
|
|
|
dirty = function() return sock:dirty() end
|
|
|
}, {
|
|
|
__call = function()
|
|
|
- -- get chunk size, skip extention
|
|
|
+ -- get chunk size, skip extension
|
|
|
local line, err = sock:receive()
|
|
|
if err then return nil, err end
|
|
|
local size = base.tonumber(string.gsub(line, ";.*", ""), 16)
|
|
@@ -241,7 +241,7 @@ local function adjustrequest(reqt)
|
|
|
if nreqt.port == "" then nreqt.port = 80 end
|
|
|
socket.try(nreqt.host and nreqt.host ~= "",
|
|
|
"invalid host '" .. base.tostring(nreqt.host) .. "'")
|
|
|
- -- compute uri if user hasn't overriden
|
|
|
+ -- compute uri if user hasn't overridden
|
|
|
nreqt.uri = reqt.uri or adjusturi(nreqt)
|
|
|
-- ajust host and port if there is a proxy
|
|
|
nreqt.host, nreqt.port = adjustproxy(nreqt)
|