【发布时间】:2018-10-30 23:44:48
【问题描述】:
我正在尝试读取 header_filter_by_lua 块中的内容编码。我在请求使用 Content-Encoding: gzip 响应的 url 时使用 chrome 的开发人员工具进行测试。我使用这些检查:
local test1 = ngx.var.http_content_encoding
local test2 = ngx.header.content_encoding
local test3 = ngx.resp.get_headers()["Content-Encoding"]
并且所有这些都给出空/零值。以同样的方式获取 User-Agent 是成功的,那么 Content-Encoding 有什么问题?
【问题讨论】:
标签: nginx lua http-headers