Don't write out response body for HEAD requests.
This commit is contained in:
parent
44dedeb839
commit
3933fbf91b
1 changed files with 4 additions and 0 deletions
|
@ -338,6 +338,10 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
res.setContentLength(hopres.getContentLength());
|
res.setContentLength(hopres.getContentLength());
|
||||||
res.setContentType(hopres.getContentType());
|
res.setContentType(hopres.getContentType());
|
||||||
|
|
||||||
|
if ("HEAD".equalsIgnoreCase(req.getMethod())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
OutputStream out = res.getOutputStream();
|
OutputStream out = res.getOutputStream();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue