Authored by chunhua.zhang

add

@@ -62,12 +62,19 @@ function route(redirectPath) @@ -62,12 +62,19 @@ function route(redirectPath)
62 end 62 end
63 end 63 end
64 64
65 - 65 +---- function read request body
  66 +function init_read_body()
  67 + if ngx.var.request_method=="POST" and ngx.var.content_type and string.match(ngx.var.content_type,"application/x%-www%-form%-urlencoded.*") then
  68 + ngx.req.read_body()
  69 + end
  70 +end
66 ---- main 71 ---- main
67 function main() 72 function main()
68 73
69 local redirectPath = "/apigateway" ; 74 local redirectPath = "/apigateway" ;
70 75
  76 + init_read_body()
  77 +
71 local percentage = switch_controller.get_percentage() 78 local percentage = switch_controller.get_percentage()
72 if percentage and percentage >= 1 then 79 if percentage and percentage >= 1 then
73 local uid = http_request.get_req_param("uid") 80 local uid = http_request.get_req_param("uid")