zhoujiexiong commented on issue #11437:
URL: https://github.com/apache/apisix/issues/11437#issuecomment-2264904139

   @GitHubLoveKe 
   
   I tested with APISIX v3.9.0, it's OK, would you pls. confirm again?
   
   ```
   use t::APISIX 'no_plan';
   
   repeat_each(1);
   no_long_string();
   no_shuffle();
   no_root_location();
   run_tests;
   
   __DATA__
   
   === TEST 1: try reproduce issue #11437
   --- config
       location = /t {
           content_by_lua_block {
               local t = require("lib.test_admin").test
               local code, body = t('/apisix/admin/routes/11437',
                   ngx.HTTP_PUT,
                   [[{
                       "plugins": {
                           "serverless-pre-function": {
                               "phase": "rewrite",
                               "functions": [
                                   "return function (conf, ctx) 
ngx.print(\"11437\"); ngx.exit(200) end"
                               ]
                           }
                       },
                       "hosts": ["*.test.com"],
                       "uri": "/xxx/*"
                   }]]
               )
               assert(body == "passed")
   
               ngx.sleep(3)
   
               local http = require "resty.http"
               local httpc = http.new()
               local uri1 = "http://127.0.0.1:"; .. ngx.var.server_port .. 
"/xxx/foo"
               local res, err = httpc:request_uri(uri1, { method = "GET", 
headers = { Host = "foo.test.com" }})
               if err then
                   ngx.log(ngx.ERR, err)
                   ngx.status = res.status
                   return
               end
               ngx.say(res.body)
           }
       }
   --- request
   GET /t
   --- response_body
   11437
   --- timeout: 30
   
   ```


-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to