@@ -594,7 +594,7 @@ function _M.send_request(self, params)
594
594
if params_headers then
595
595
-- We assign one by one so that the metatable can handle case insensitivity
596
596
-- 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
598
598
headers [k ] = v
599
599
end
600
600
end
738
738
739
739
740
740
function _M .request (self , params )
741
- params = tbl_copy (params ) -- Take by value
741
+ params = tbl_copy (params ) -- Take by value
742
742
local res , err = self :send_request (params )
743
743
if not res then
744
744
return res , err
749
749
750
750
751
751
function _M .request_pipeline (self , requests )
752
- requests = tbl_copy (requests ) -- Take by value
752
+ requests = tbl_copy (requests ) -- Take by value
753
753
754
754
for _ , params in ipairs (requests ) do
755
755
if params .headers and params .headers [" Expect" ] == " 100-continue" then
793
793
794
794
795
795
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
797
797
798
798
local parsed_uri , err = self :parse_uri (uri , false )
799
799
if not parsed_uri then
@@ -923,18 +923,18 @@ function _M.get_client_body_reader(_, chunksize, sock)
923
923
-- Not yet supported by ngx_lua but should just work...
924
924
return _chunked_body_reader (sock , chunksize )
925
925
else
926
- return nil
926
+ return nil
927
927
end
928
928
end
929
929
930
930
931
931
function _M .proxy_request (self , chunksize )
932
- return self :request {
932
+ return self :request ( {
933
933
method = ngx_req_get_method (),
934
934
path = ngx_re_gsub (ngx_var .uri , " \\ s" , " %20" , " jo" ) .. ngx_var .is_args .. (ngx_var .query_string or " " ),
935
935
body = self :get_client_body_reader (chunksize ),
936
936
headers = ngx_req_get_headers (),
937
- }
937
+ })
938
938
end
939
939
940
940
@@ -947,7 +947,7 @@ function _M.proxy_response(_, response, chunksize)
947
947
ngx .status = response .status
948
948
949
949
-- Filter out hop-by-hop headeres
950
- for k ,v in pairs (response .headers ) do
950
+ for k , v in pairs (response .headers ) do
951
951
if not HOP_BY_HOP_HEADERS [str_lower (k )] then
952
952
ngx_header [k ] = v
953
953
end
973
973
974
974
975
975
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
977
977
end
978
978
979
979
@@ -997,9 +997,9 @@ function _M.get_proxy_uri(self, scheme, host)
997
997
no_proxy_set [host_suffix [1 ]] = true
998
998
end
999
999
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,
1003
1003
-- local.com:80, and www.local.com, but not www.notlocal.com.
1004
1004
--
1005
1005
-- Therefore, we keep stripping subdomains from the host, compare
0 commit comments