ngx.req.get_headers()["xxxx"] return nil #210

baoming opened this Issue Feb 20, 2013 · 3 comments


None yet

2 participants

baoming commented Feb 20, 2013

request with addition header xxxx return nil

Howto reproduce:

  1. a.lua
local xcdomain = ngx.req.get_headers()["xxxx"]
ngx.log(ngx.ERR, xcdomain)               --this will see a nil in nginx error.log
  1. header_filter_by_lua_file conf/dhgate.lua; 

agentzh commented Feb 20, 2013
  1. Which version of ngx_lua are you using? If you're not using the latest, then try upgrading.
  2. Are you sure you have that particular request header in your request? Could you provide a more complete example that can reproduce this issue?
agentzh commented Sep 8, 2013

@baoming Any updates on this issue please?

baoming commented Oct 21, 2013

With more debug figure out that it is not an issue. in my case, there is a Upercase header name look like "Xxxx", and my lua code use "Xxxx" too. when change it to "xxxx" everything works well.

@baoming baoming closed this Oct 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment