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/10/31 01:21:41 UTC

[GitHub] [apisix] engimatic opened a new issue, #8209: 使用serverless-pre-function插件时,url请求丢失参数

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

   ### Description
   
   插件代码
   `return function(conf, ctx) local core = require("apisix.core");local http =
       require("resty.http");local httpc = http.new(); local cjson = require
       "cjson";local cjson2 = cjson.new();local authorization =
       core.request.header(ctx, "Authorization"); local uri =
       ctx.var.uri;if(authorization == nil) then ngx.log(ngx.ERR, "match uri ",
       uri);core.response.exit(401);return; end;local url =
       "http://ip:port/checkToken";local
       req = {};req.uri = uri;req.token = authorization; local res,err =
       httpc:request_uri(url, {method = "POST", body = cjson2.encode(req), headers
       = {
           ["Content-Type"] = "application/json"
       }});if not res then  core.response.exit(500);return;end;local result =
       cjson2.decode(res.body); if not(result["data"]) then ngx.log(ngx.ERR,
       "RESULT ", res.body);core.response.exit(res.status, res.body);return;end;end`
   
   调用接口/v1/sys/group/userLike?name=aa,连续多次请求,后端发现部分请求url没有name参数,name参数被截断。禁用插件后,没有问题
   
   ### Environment
   
   - APISIX version :2.15.0
   - Operating system :k8s
   


-- 
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] engimatic commented on issue #8209: 使用serverless-pre-function插件时,url请求丢失参数

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

   @tokers 


-- 
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] tokers commented on issue #8209: 使用serverless-pre-function插件时,url请求丢失参数

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

   @engimatic Is this your code? Try to troubleshoot it.


-- 
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] tzssangglass closed issue #8209: url request missing parameters when using serverless-pre-function plugin

Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #8209: url request missing parameters when using serverless-pre-function plugin
URL: https://github.com/apache/apisix/issues/8209


-- 
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] engimatic commented on issue #8209: 使用serverless-pre-function插件时,url请求丢失参数

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

   > troubleshoot
   
   ![image](https://user-images.githubusercontent.com/14733591/198913876-17e257e7-0d7a-4d14-bd2e-b8c19fecf58f.png)
   这是我的erverless-pre-function插件代码。 /v1/sys/group/userLike?name=aa没100次请求,可能出现4-5个参数被截断的问题。post请求json格式的request,都没有出现过问题


-- 
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] engimatic commented on issue #8209: 使用serverless-pre-function插件时,url请求丢失参数

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

   > @engimatic Is this your code? Try to troubleshoot it.
   ![image](https://user-images.githubusercontent.com/14733591/198914132-609edb3c-bdb3-4964-a16b-5c6b509b8eea.png)
   
   这是我的erverless-pre-function插件代码。 /v1/sys/group/userLike?name=aa没100次请求,可能出现4-5个参数被截断的问题。post请求json格式的request,都没有出现过问题


-- 
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