Merge default into minor.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-01-12 22:52:24 -04:00
9 changed files with 22 additions and 8 deletions
@@ -44,7 +44,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()
@@ -71,7 +71,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)
@@ -258,7 +258,7 @@ local function adjustrequest(reqt)
if not (nreqt.host and nreqt.host ~= "") then
socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'")
end
-- compute uri if user hasn't overriden
-- compute uri if user hasn't overridden
nreqt.uri = reqt.uri or adjusturi(nreqt)
-- adjust headers in request
nreqt.headers = adjustheaders(nreqt)
@@ -225,7 +225,7 @@ local function adjust_headers(mesgt)
lower["date"] = lower["date"] or
os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE)
lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
-- this can't be overriden
-- this can't be overridden
lower["mime-version"] = "1.0"
return lower
end
+1 -1
View File
@@ -49,7 +49,7 @@ local function make_set(t)
return s
end
-- these are allowed withing a path segment, along with alphanum
-- these are allowed within a path segment, along with alphanum
-- other characters must be escaped
local segment_set = make_set {
"-", "_", ".", "!", "~", "*", "'", "(",