解析JSON出现异常(JSON返回结果)

syntax error,except start with { or [,but actually start with error’, data=null}

HTTP请求后返回结果,出现syntax error,except start with { or [,but actually start with error', data=null}

经过查看,发现返回Result为:

<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

问题: Nginx默认最大能够上传1MB文件,上传的文件超过1M
解决方案
修改nginx.conf配置文件,在http{}中加入 client_max_body_size 10m;
然后重启nginx

你可能感兴趣的:(json,nginx)