<div dir="ltr"><div class="gmail_default" style="font-family:simsun,serif;font-size:large">i think this is a feature not a bug</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-16 16:01 GMT+08:00 洪志道 <span dir="ltr"><<a href="mailto:hongzhidao@gmail.com" target="_blank">hongzhidao@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry, sent too much.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-02-16 16:00 GMT+08:00 洪志道 <span dir="ltr"><<a href="mailto:hongzhidao@gmail.com" target="_blank">hongzhidao@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi!</div><div><div class="m_-148863702929148352h5"><div><br></div><div>diff -r da46bfc484ef src/http/ngx_http_variables.c</div><div>--- a/src/http/ngx_http_variables.<wbr>c<span class="m_-148863702929148352m_5871065437658170677m_-3665179499786509594gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>Mon Feb 13 21:45:01 2017 +0300</div><div>+++ b/src/http/ngx_http_variables.<wbr>c<span class="m_-148863702929148352m_5871065437658170677m_-3665179499786509594gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>Wed Feb 08 10:31:53 2017 +0800</div><div>@@ -783,6 +783,10 @@</div><div> ssize_t s, *sp;</div><div> ngx_str_t val;</div><div><br></div><div>+ if (v->data == NULL) {</div><div>+ return;</div><div>+ }</div><div>+</div><div> val.len = v->len;</div><div> val.data = v->data;</div><div><br></div><div><br></div><div>The following will cause core file, I think it's better to deal with in nginx.</div><div><br></div><div><div>server {</div><div> listen 8000;</div><div><br></div><div> location / {</div><div> content_by_lua_block {</div><div> ngx.var.limit_rate = size; # size is undefined.</div><div> ngx.say('hello lua');</div><div> }</div><div> }</div></div><div><br></div><div><br></div><div>============== set handler in lua-module ============</div><div><div> if (value_type == LUA_TNIL) {</div><div> vv->valid = 0;</div><div> vv->not_found = 1;</div><div> vv->no_cacheable = 0;</div><div> vv->data = NULL;</div><div> vv->len = 0;</div><div><br></div><div> } else {</div><div> vv->valid = 1;</div><div> vv->not_found = 0;</div><div> vv->no_cacheable = 0;</div><div><br></div><div> vv->data = val;</div><div> vv->len = len;</div><div> }</div><div><br></div><div> v->set_handler(r, vv, v->data);</div></div><div>==============================<wbr>=================</div><div><br></div><div>Thanks.</div><div>B.R.</div></div></div></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-devel</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br><div><font face="simsun, serif">-----</font></div><div><font face="simsun, serif"><a href="http://blog.soul11201.com" target="_blank">http://blog.soul11201.com</a></font></div></div></div>
</div>