OC发送的IOS付费验证数据(post),nginx+lua端接收到的数据是不完全的,谁碰到过类似的问题?

新手上路,请多包涵

local json = require("cjson")
local red = require("a2.libs.redis_pool")
local conf = require("a2.libs.config")
local my = require("a2.libs.my_pool")
local http = require("resty.http")

local args = ngx.req.get_uri_args()

local data = {}
data["Status"] = 0
data["Desc"] = "OK"
local request_method = ngx.var.request_method

local args = nil
local body_data=nil

if "GET" == request_method then

data["Status"] = 1
data["Desc"] = "request_method error"
ngx.say(json.encode(data))
return 

elseif "POST" == request_method then

ngx.req.read_body()  
body_data = ngx.req.get_body_data()

end

ngx.log(ngx.ERR, "====================body_data============================: "..body_data)
data["data"] = body_data
json.encode_empty_table_as_object(false)
ngx.say(json.encode(data))

以上就是代码,只用来测试无实际用途。 获取到的body_data是不完全的,谁能帮忙说明下是哪的问题呢。
OC端自己发送之前打印出的数据是没问题的,通过http发送过来,数据就不完整了,数据量也不是很大,也就几k。

阅读 2.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题