public class DefaultServlet
extends HttpServlet {
-
+
+ private static final long serialVersionUID = 1L;
+
// ----------------------------------------------------- Instance Variables
boolean content)
throws IOException, ServletException {
+ boolean serveContent = content;
+
// Identify the requested resource path
String path = getRelativePath(request);
if (debug > 0) {
- if (content)
+ if (serveContent)
log("DefaultServlet.serveResource: Serving resource '" +
path + "' headers and data");
else
// Special case for zero length files, which would cause a
// (silent) ISE when setting the output buffer size
if (contentLength == 0L) {
- content = false;
+ serveContent = false;
}
}
ServletOutputStream ostream = null;
PrintWriter writer = null;
- if (content) {
+ if (serveContent) {
// Trying to retrieve the servlet output stream
InputStream renderResult = null;
if (cacheEntry.context != null) {
- if (content) {
+ if (serveContent) {
// Serve the directory browser
renderResult =
render(request.getContextPath(), cacheEntry);
}
// Copy the input stream to our output stream (if requested)
- if (content) {
+ if (serveContent) {
try {
response.setBufferSize(output);
} catch (IllegalStateException e) {
response.setContentType(contentType);
}
- if (content) {
+ if (serveContent) {
try {
response.setBufferSize(output);
} catch (IllegalStateException e) {
response.setContentType("multipart/byteranges; boundary="
+ mimeSeparation);
- if (content) {
+ if (serveContent) {
try {
response.setBufferSize(output);
} catch (IllegalStateException e) {