Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusConfiguration.java2
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/Response.java6
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java7
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java1
4 files changed, 8 insertions, 8 deletions
diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusConfiguration.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusConfiguration.java
index e7086d1146..3962994d5d 100644
--- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusConfiguration.java
+++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/PlusConfiguration.java
@@ -92,7 +92,7 @@ public class PlusConfiguration extends AbstractConfiguration
}
catch (NameNotFoundException e)
{
- LOG.info("No Transaction manager found - if your webapp requires one, please configure one.");
+ LOG.debug("No Transaction manager found - if your webapp requires one, please configure one.");
}
}
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
index 6bf81cccca..b1fa612447 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
@@ -135,10 +135,10 @@ public class Response implements HttpServletResponse
Response response = _channel.getResponse();
String contentType = httpContent.getContentType();
if (contentType != null && !response.getHttpFields().containsKey(HttpHeader.CONTENT_TYPE.asString()))
- response.getHttpFields().put(HttpHeader.CONTENT_TYPE, contentType);
-
+ setContentType(contentType);
+
if (httpContent.getContentLength() > 0)
- response.getHttpFields().putLongField(HttpHeader.CONTENT_LENGTH, httpContent.getContentLength());
+ setLongContentLength(httpContent.getContentLength());
String lm = httpContent.getLastModified();
if (lm != null)
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
index f3bc5df507..d1e13ce35b 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
@@ -602,19 +602,20 @@ public class ResourceHandler extends HandlerWrapper
HttpFields fields = ((Response)response).getHttpFields();
if (length>0)
- fields.putLongField(HttpHeader.CONTENT_LENGTH,length);
+ ((Response)response).setLongContentLength(length);
if (_cacheControl!=null)
fields.put(HttpHeader.CACHE_CONTROL,_cacheControl);
}
else
{
- if (length>0)
+ if (length>Integer.MAX_VALUE)
response.setHeader(HttpHeader.CONTENT_LENGTH.asString(),Long.toString(length));
+ else if (length>0)
+ response.setContentLength((int)length);
if (_cacheControl!=null)
response.setHeader(HttpHeader.CACHE_CONTROL.asString(),_cacheControl.toString());
}
-
}
}
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java
index 4a32465a73..97f69b295a 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java
@@ -988,7 +988,6 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
else
// Handle cached resource
(resource).writeTo(multi,start,size);
-
}
if (in!=null)
in.close();

Back to the top