request.setCharacterEncoding("iso8859-1");
response.setContentType("text/plain");
InputStream is = request.getInputStream();
logger.info("Content-Length长度---》"+request.getContentLength());
byte[] buf = new byte[request.getContentLength()];
logger.info("buf的长度"+buf.length);
int len = is.read(buf);
logger.info("len----------->"+len);
现在的问题是有时候接受的数据不全,查看log看到Content-Length与len 不相等,正常情况下Content-Length是等于len的,各位大侠帮助解决下.......
------解决方案--------------------