Changeset 354

Show
Ignore:
Timestamp:
08/25/08 16:36:49 (3 months ago)
Author:
arneke
Message:

Added proxy interface to support JS client

Location:
trunk/geowebcache/src/main
Files:
2 added
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/geowebcache/src/main/java/org/geowebcache/layer/wms/WMSHttpHelper.java

    r346 r354  
    213213                try { 
    214214                    if (responseLength < 1) { 
    215                         ret = ServletUtils.readStream(wmsBackendCon.getInputStream(), 16384, 1024); 
     215                        ret = ServletUtils.readStream(wmsBackendCon.getInputStream(), 16384, 2048); 
    216216                    } else { 
    217217                        ret = new byte[responseLength]; 
  • trunk/geowebcache/src/main/java/org/geowebcache/security/RESTfulDefinitionSource.java

    r317 r354  
     1/** 
     2 * This code is taken from Spring and therefore presumably licensed under Apache 2.0 
     3 *  
     4 * http://www.apache.org/licenses/LICENSE-2.0.html 
     5 *  
     6 * @author Chris Berry 
     7 *         http://opensource.atlassian.com/projects/spring/browse/SEC-531 
     8 */ 
     9 
    110package org.geowebcache.security; 
    211 
     
    2029import org.springframework.util.StringUtils; 
    2130 
    22 /** 
    23  *  
    24  * @author Chris Berry 
    25  *         http://opensource.atlassian.com/projects/spring/browse/SEC-531 
    26  *  
    27  */ 
     31 
    2832public class RESTfulDefinitionSource implements 
    2933        FilterInvocationDefinitionSource { 
     
    221225            ConfigAttributeDefinition configDefinition = new ConfigAttributeDefinition(); 
    222226 
    223             Iterator configAttributesIt = mapping.getConfigAttributes() 
    224                     .iterator(); 
     227            Iterator configAttributesIt = mapping.getConfigAttributes().iterator(); 
    225228            while (configAttributesIt.hasNext()) { 
    226229                String s = (String) configAttributesIt.next(); 
  • trunk/geowebcache/src/main/java/org/geowebcache/security/RESTfulPathBasedFilterInvocationDefinitionMap.java

    r317 r354  
     1/** 
     2 * This code is taken from Spring and therefore presumably licensed under Apache 2.0 
     3 *  
     4 * http://www.apache.org/licenses/LICENSE-2.0.html 
     5 *  
     6 * @author Chris Berry 
     7 *         http://opensource.atlassian.com/projects/spring/browse/SEC-531 
     8 */ 
     9 
    110package org.geowebcache.security; 
    211 
     
    2029import org.springframework.util.PathMatcher; 
    2130 
    22 /** 
    23  *  
    24  * @author Chris Berry 
    25  *         http://opensource.atlassian.com/projects/spring/browse/SEC-531 
    26  *  
    27  */ 
    2831 
    2932public class RESTfulPathBasedFilterInvocationDefinitionMap extends 
  • trunk/geowebcache/src/main/webapp/WEB-INF/geowebcache-servlet.xml

    r347 r354  
    6464        class="org.geowebcache.service.kml.KMLService"/> 
    6565 
    66  
     66  <bean id="gwcProxyDispatcher" 
     67        class="org.geowebcache.proxy.ProxyDispatcher"/> 
     68   
    6769  <bean id="gwcCacheKeyFile" class="org.geowebcache.cache.file.FilePathKey2"/> 
    68      
     70   
    6971  <bean id="gwcCacheFile" class="org.geowebcache.cache.file.FileCache"> 
    7072    <property name="defaultKeyBeanId"><value>gwcCacheKeyFile</value></property> 
    7173  </bean> 
    72  
     74   
    7375   
    7476  <bean id="gwcUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> 
     
    8183        <prop key="/rpc/**">geowebcacheDispatcher</prop> 
    8284        <prop key="/demo/**">geowebcacheDispatcher</prop> 
    83                 <prop key="/rest/**">gwcRESTDispatcher</prop> 
     85        <prop key="/rest/**">gwcRESTDispatcher</prop> 
     86        <prop key="/proxy/**">gwcProxyDispatcher</prop> 
    8487      </props> 
    8588    </property> 
  • trunk/geowebcache/src/main/webapp/WEB-INF/web.xml

    r301 r354  
    22<web-app> 
    33  <display-name>GeoWebCache</display-name> 
    4  
     4   
    55  <!-- pick up all spring application contexts --> 
    66  <context-param> 
     
    1212  <!-- acegi security filter --> 
    1313  <filter> 
    14                 <filter-name>Acegi Filter Chain Proxy</filter-name> 
    15                 <filter-class> 
    16                         org.acegisecurity.util.FilterToBeanProxy 
    17                 </filter-class> 
    18                 <init-param> 
    19                         <param-name>targetClass</param-name> 
    20                         <param-value> 
    21                                 org.acegisecurity.util.FilterChainProxy 
    22                         </param-value> 
    23                 </init-param> 
    24         </filter> 
    25  
    26         <filter-mapping> 
    27                 <filter-name>Acegi Filter Chain Proxy</filter-name> 
    28                 <url-pattern>/*</url-pattern> 
    29         </filter-mapping> 
    30  
     14    <filter-name>Acegi Filter Chain Proxy</filter-name> 
     15    <filter-class> 
     16      org.acegisecurity.util.FilterToBeanProxy 
     17    </filter-class> 
     18    <init-param> 
     19      <param-name>targetClass</param-name> 
     20      <param-value> 
     21        org.acegisecurity.util.FilterChainProxy 
     22      </param-value> 
     23    </init-param> 
     24  </filter> 
     25   
     26  <filter-mapping> 
     27    <filter-name>Acegi Filter Chain Proxy</filter-name> 
     28    <url-pattern>/rest/*</url-pattern> 
     29  </filter-mapping> 
     30   
     31  <filter-mapping> 
     32    <filter-name>Acegi Filter Chain Proxy</filter-name> 
     33    <url-pattern>/proxy/*</url-pattern> 
     34  </filter-mapping> 
     35   
    3136   
    3237  <!--  spring context loader --> 
     
    6166    <url-pattern>/rpc/*</url-pattern> 
    6267  </servlet-mapping> 
    63  
     68   
    6469  <servlet-mapping> 
    6570    <servlet-name>geowebcache</servlet-name> 
     
    6974  <servlet-mapping> 
    7075    <servlet-name>geowebcache</servlet-name> 
     76    <url-pattern>/proxy/*</url-pattern> 
     77  </servlet-mapping> 
     78   
     79  <servlet-mapping> 
     80    <servlet-name>geowebcache</servlet-name> 
    7181    <url-pattern>/rest/*</url-pattern> 
    7282  </servlet-mapping> 
    7383   
    74 <!--  
    75   <context-param> 
    76     <param-name>GEOWEBCACHE_CACHE_DIR</param-name> 
    77     <param-value>/tmp</param-value> 
    78   </context-param> 
    79 --> 
    80  
    81 <!-- 
    82   <context-param> 
    83     <param-name>GEOSERVER_WMS_URL</param-name> 
    84     <param-value>http://sigma.openplans.org:8080/geosearch/wms?request=GetCapabilities</param-value> 
    85   </context-param> 
    86 --> 
    87  
    88 <!--  
    89   <context-param> 
    90     <param-name>GEOWEBCACHE_ALLOWED_SEEDERS</param-name> 
    91     <param-value>*</param-value> 
    92   </context-param> 
    93 --> 
     84  <!--  
     85       <context-param> 
     86         <param-name>GEOWEBCACHE_CACHE_DIR</param-name> 
     87         <param-value>/tmp</param-value> 
     88       </context-param> 
     89       --> 
     90   
     91  <!-- The following only affects GeoServerConfiguration.class --> 
     92  <!--  
     93       <context-param> 
     94         <param-name>GEOSERVER_WMS_URL</param-name> 
     95         <param-value>http://sigma.openplans.org:8080/geosearch/wms?request=GetCapabilities</param-value> 
     96       </context-param> 
     97       -->   
    9498</web-app>