Using uninitialized variable value

Tomas Kvasnicka nzt4567 at
Sun Dec 13 23:31:11 UTC 2015


we are getting quite a lot of these warnings about using uninitialized variables, although we have “set” directive for each variable in every server block. I understand the fact, that it happens when the request is not valid and the rewrite module handler does not run, but this also happens on valid requests (valid headers, valid request line, correctly detected & set server block, …) AND we are unable to reproduce it. Issuing the same request with the same headers to the same instance of nginx is unfortunately not enough to regenerate the warning. 

Does anybody have some examples of situations in which the rewrite handler will not run therefore these variables will seem as uninitialized? Or can you point me to what additional info I can provide?

FYI: I know I can mute the warnings, but when the variables are uninitialized and they are used in the “if=“ of “access_log” directive it then does not work as it should :/

Tomas Kvasnicka

More information about the nginx mailing list