You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/30 13:08:13 UTC

[GitHub] [apisix] worldwonderer opened a new issue, #7167: bug: iproxy-cache plugin generate_complex_value may fail due to concat nil values

worldwonderer opened a new issue, #7167:
URL: https://github.com/apache/apisix/issues/7167

   ### Current Behavior
   
   if proxy-cache plugins configures cache_key with ["$arg_a", "$arg_b"] and $arg_a and $arg_b are both nil, apisix will abort with error.
   
   I think it is quite normal that api has not required args, can this line `tmp[i] = ctx.var[string.sub(value, 2)]` change to `tmp[i] = ctx.var[string.sub(value, 2)] or ""`? if it is acceptable, i would like to submit a PR.
   
   ### Expected Behavior
   
   cache_key not fail with nil variables
   
   ### Error Logs
   
   [error] 3329653#3329653: *15666726 lua entry thread aborted: runtime error: ...tion/bin/apisix/plugins/proxy-cache.lua:149: invalid value (nil) at index 2 in table for 'concat'
   
   ### Steps to Reproduce
   
   create  route with proxy-cache plugin, and configure cache key with `"cache_key": ["$arg_a", "$arg_b"] ` and then request without url args
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.11.0
   - Operating system (run `uname -a`):Linux 11-186-252-137 4.14.105-1-tlinux3-0016 #1 SMP Fri Jul 31 16:16:47 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):nginx version: openresty/1.19.9.1
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander closed issue #7167: bug: proxy-cache plugin generate_complex_value may fail due to concat nil values

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #7167: bug: proxy-cache plugin generate_complex_value may fail due to concat nil values
URL: https://github.com/apache/apisix/issues/7167


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] soulbird commented on issue #7167: bug: proxy-cache plugin generate_complex_value may fail due to concat nil values

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #7167:
URL: https://github.com/apache/apisix/issues/7167#issuecomment-1141197516

   Welcome to contribute PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org