https://github.com/tokers/lua-resty-requests/blob/ff1309a4882a8253df18d6a37985f004aec3f8a1/lib/resty/requests/response.lua#L315 https://github.com/tokers/lua-resty-requests/blob/ff1309a4882a8253df18d6a37985f004aec3f8a1/lib/resty/requests/response.lua#L316 I found the bug is caused by the code, fixed ContentType values, it should using regular expression to detect the validity of ContentType