Skip to content

Commit cf957cf

Browse files
committed
Fix whitespace issues
1 parent db93fbf commit cf957cf

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/resty/http.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ function _M.send_request(self, params)
594594
if params_headers then
595595
-- We assign one by one so that the metatable can handle case insensitivity
596596
-- for us. You can blame the spec for this inefficiency.
597-
for k,v in pairs(params_headers) do
597+
for k, v in pairs(params_headers) do
598598
headers[k] = v
599599
end
600600
end
@@ -738,7 +738,7 @@ end
738738

739739

740740
function _M.request(self, params)
741-
params = tbl_copy(params) -- Take by value
741+
params = tbl_copy(params) -- Take by value
742742
local res, err = self:send_request(params)
743743
if not res then
744744
return res, err
@@ -749,7 +749,7 @@ end
749749

750750

751751
function _M.request_pipeline(self, requests)
752-
requests = tbl_copy(requests) -- Take by value
752+
requests = tbl_copy(requests) -- Take by value
753753

754754
for _, params in ipairs(requests) do
755755
if params.headers and params.headers["Expect"] == "100-continue" then
@@ -793,7 +793,7 @@ end
793793

794794

795795
function _M.request_uri(self, uri, params)
796-
params = tbl_copy(params or {}) -- Take by value
796+
params = tbl_copy(params or {}) -- Take by value
797797

798798
local parsed_uri, err = self:parse_uri(uri, false)
799799
if not parsed_uri then
@@ -923,18 +923,18 @@ function _M.get_client_body_reader(_, chunksize, sock)
923923
-- Not yet supported by ngx_lua but should just work...
924924
return _chunked_body_reader(sock, chunksize)
925925
else
926-
return nil
926+
return nil
927927
end
928928
end
929929

930930

931931
function _M.proxy_request(self, chunksize)
932-
return self:request{
932+
return self:request({
933933
method = ngx_req_get_method(),
934934
path = ngx_re_gsub(ngx_var.uri, "\\s", "%20", "jo") .. ngx_var.is_args .. (ngx_var.query_string or ""),
935935
body = self:get_client_body_reader(chunksize),
936936
headers = ngx_req_get_headers(),
937-
}
937+
})
938938
end
939939

940940

@@ -947,7 +947,7 @@ function _M.proxy_response(_, response, chunksize)
947947
ngx.status = response.status
948948

949949
-- Filter out hop-by-hop headeres
950-
for k,v in pairs(response.headers) do
950+
for k, v in pairs(response.headers) do
951951
if not HOP_BY_HOP_HEADERS[str_lower(k)] then
952952
ngx_header[k] = v
953953
end
@@ -973,7 +973,7 @@ end
973973

974974

975975
function _M.set_proxy_options(self, opts)
976-
self.proxy_opts = tbl_copy(opts) -- Take by value
976+
self.proxy_opts = tbl_copy(opts) -- Take by value
977977
end
978978

979979

@@ -997,9 +997,9 @@ function _M.get_proxy_uri(self, scheme, host)
997997
no_proxy_set[host_suffix[1]] = true
998998
end
999999

1000-
-- From curl docs:
1001-
-- matched as either a domain which contains the hostname, or the
1002-
-- hostname itself. For example local.com would match local.com,
1000+
-- From curl docs:
1001+
-- matched as either a domain which contains the hostname, or the
1002+
-- hostname itself. For example local.com would match local.com,
10031003
-- local.com:80, and www.local.com, but not www.notlocal.com.
10041004
--
10051005
-- Therefore, we keep stripping subdomains from the host, compare

0 commit comments

Comments
 (0)