我正在从一个托管的bean中打开一个HttpURLConnection来发布到一个外部服务.当我打电话给HttpUrlConnection.getInputStream()我得到以下警告:
WARN [Parameters] Parameters : Invalid chunk ignored
一切进程都很好,但是我想把一些这些警告从我们的日志中删除.是什么导致这个警告,我该如何阻止它发生?
以下是相关代码:
@ManagedBean @SessionScoped public class MyController { private void doStuff() { ... URL url = new URL(externalServiceUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); wr = new OutputStreamWriter(conn.getOutputStream()); wr.write(postData); wr.flush(); InputStream is = conn.getInputStream(); // Warning logged after this line ... } }