portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver ContentFilter.java
Date Wed, 31 Dec 2003 20:08:38 GMT
weaver      2003/12/31 12:08:38

  Modified:    content-server/src/java/org/apache/jetspeed/contentserver
                        ContentFilter.java
  Log:
  removed conditional logic that only recognized gif files
  
  Revision  Changes    Path
  1.2       +16 -18    jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver/ContentFilter.java
  
  Index: ContentFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver/ContentFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContentFilter.java	31 Dec 2003 19:48:45 -0000	1.1
  +++ ContentFilter.java	31 Dec 2003 20:08:38 -0000	1.2
  @@ -88,24 +88,22 @@
                               + " could not be located.  Make sure your container is properly
configured to detect MIME types.");
                   }
   
  -                if (mimeType.equals("image/gif"))
  -                {
  -                    System.out.println("GIF detected: " + requestURI);
  -
  -                    boolean found = setThemeContent(requestURI, httpRequest, httpResponse,
mimeType);
  +                System.out.println(mimeType + " detected: " + requestURI);
   
  -                    if (found)
  -                    {
  -                        System.out.println("Setting status to OK");
  -                        httpResponse.setStatus(HttpServletResponse.SC_OK);
  -                    }
  -                    else
  -                    {
  -                        chain.doFilter(request, response);
  -                    }
  +                boolean found = setThemeContent(requestURI, httpRequest, httpResponse,
mimeType);
   
  -                    return;
  +                if (found)
  +                {
  +                    System.out.println("Setting status to OK");
  +                    httpResponse.setStatus(HttpServletResponse.SC_OK);
                   }
  +                else
  +                {
  +                    chain.doFilter(request, response);
  +                }
  +
  +                return;
  +
               }
           }
           catch (Exception e)
  @@ -138,7 +136,7 @@
               if (fileCache.containsKey(themeName + ":" + URI))
               {
                   fqFile = (File) fileCache.get(themeName + ":" + URI);
  -				System.out.println("Found cached theme file for URI: " + URI);
  +                System.out.println("Found cached theme file for URI: " + URI);
               }
               else
               {
  @@ -146,7 +144,7 @@
                   fqFile = new File(fqPath);
                   System.out.println("Actual theme content located at: " + fqPath);
                   System.out.println("Theme content exists? " + fqFile.exists());
  -				fileCache.put(themeName + ":" + URI, fqFile);
  +                fileCache.put(themeName + ":" + URI, fqFile);
               }
   
               BufferedInputStream bis = null;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message