diff --git a/lib/resty/http/simple.lua b/lib/resty/http/simple.lua index aab6d8d..153dc53 100644 --- a/lib/resty/http/simple.lua +++ b/lib/resty/http/simple.lua @@ -122,7 +122,7 @@ local function _req_header(self, opts) if not headers['Accept'] then headers['Accept'] = "*/*" end - if version == 0 and not headers['Connection'] then + if opts.version == 0 and not headers['Connection'] then headers['Connection'] = "Keep-Alive" end