我有一個響應Twilio API的Java Servlet。似乎Twilio不支持我的回覆所使用的分塊傳輸。我如何避免使用Transfer-Encoding: chunked
?如何在沒有傳輸編碼的情況下發送HTTP響應:分塊?
這裏是我的代碼:
// response is HttpServletResponse
// xml is a String with XML in it
response.getWriter().write(xml);
response.getWriter().flush();
我使用碼頭的Servlet容器。
什麼是您的應用服務器/ Servlet容器? – 2013-05-13 23:25:42
@AnthonyAccioly http://www.eclipse.org/jetty/ – Adam 2013-05-13 23:50:34