[wsas-java-dev] svn commit r69 -
wsas/java/trunk/modules/wsf-common-core/src/org/wso2/wsf/common/transport/http
svn at wso2.com
svn at wso2.com
Fri Dec 1 07:59:17 PST 2006
Author: azeez
Date: Fri Dec 1 07:59:16 2006
New Revision: 69
Modified:
wsas/java/trunk/modules/wsf-common-core/src/org/wso2/wsf/common/transport/http/FaviconProvider.java
Log:
Formatting
Modified: wsas/java/trunk/modules/wsf-common-core/src/org/wso2/wsf/common/transport/http/FaviconProvider.java
==============================================================================
--- wsas/java/trunk/modules/wsf-common-core/src/org/wso2/wsf/common/transport/http/FaviconProvider.java (original)
+++ wsas/java/trunk/modules/wsf-common-core/src/org/wso2/wsf/common/transport/http/FaviconProvider.java Fri Dec 1 07:59:16 2006
@@ -24,11 +24,10 @@
import javax.servlet.http.HttpServletResponse;
import java.net.URL;
import java.io.IOException;
-/*
+
+/**
* This is a Jetty related Favicon providing class
- *
*/
-
public class FaviconProvider {
private long faviconModified = (System.currentTimeMillis() / 1000) * 1000;
@@ -44,8 +43,9 @@
try {
URL fav = this.getClass().getClassLoader()
.getResource(relativePath);
- if (fav != null)
+ if (fav != null) {
favicon = IO.readBytes(fav.openStream());
+ }
} catch (IOException e) {
Log.warn(e);
throw e;
@@ -57,9 +57,9 @@
String method = request.getMethod();
if (serveIcon && favicon != null && method.equals(HttpMethods.GET) &&
request.getRequestURI().equals("/favicon.ico")) {
- if (request.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE) == faviconModified)
+ if (request.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE) == faviconModified) {
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
- else {
+ } else {
response.setStatus(HttpServletResponse.SC_OK);
response.setContentType("image/x-icon");
response.setContentLength(favicon.length);
More information about the Wsas-java-dev
mailing list