https://bz.apache.org/bugzilla/show_bug.cgi?id=64255
Bug ID: 64255
Summary: tomcat-embed:chunked responses with header
'connetion:close' are damaged
Product: Tomcat 9
Version: 9.0.x
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Servlet
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -----
version:9.0.31
code segment is here
Tomcat.addServlet(ctx, "hello", new HttpServlet() {
private static final long serialVersionUID = -8721082143781719844L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse
resp)
throws IOException {
resp.setStatus(200);
resp.setHeader("Transfer-Encoding", "chunked");
resp.setHeader("Connection", "close");
resp.getOutputStream().write('{');
resp.getOutputStream().flush();
}
});
and use curl there will be
curl 'http://localhost:8089/hello'
curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
the compele code is here
https://github.com/taojiaenx/tomcat-chunk-error.git
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]