cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1058329 - in /cxf/trunk/rt/transports/http/src/main: java/org/apache/cxf/transport/http/Headers.java java/org/apache/cxf/transport/http/policy/PolicyUtils.java resources/schemas/wsdl/http-conf.xsd
Date Wed, 12 Jan 2011 21:46:23 GMT
Author: dkulp
Date: Wed Jan 12 21:46:22 2011
New Revision: 1058329

URL: http://svn.apache.org/viewvc?rev=1058329&view=rev
Log:
[CXF-622] Change Cache-Control to a string as it can be pretty free
form.

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
    cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java?rev=1058329&r1=1058328&r2=1058329&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Wed Jan 12 21:46:22 2011
@@ -99,7 +99,7 @@ public class Headers {
         }
         if (policy.isSetCacheControl()) {
             headers.put("Cache-Control",
-                    createMutableList(policy.getCacheControl().value()));
+                    createMutableList(policy.getCacheControl()));
         }
         if (policy.isSetHost()) {
             headers.put("Host",
@@ -143,7 +143,7 @@ public class Headers {
     void setFromServerPolicy(HTTPServerPolicy policy) {
         if (policy.isSetCacheControl()) {
             headers.put("Cache-Control",
-                        createMutableList(policy.getCacheControl().value()));
+                        createMutableList(policy.getCacheControl()));
         }
         if (policy.isSetContentLocation()) {
             headers.put("Content-Location",

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java?rev=1058329&r1=1058328&r2=1058329&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
Wed Jan 12 21:46:22 2011
@@ -301,7 +301,7 @@ public final class PolicyUtils {
         
         if (compatible) {
             compatible &= !p1.isSetCacheControl() || !p2.isSetCacheControl()
-                || p1.getCacheControl().value().equals(p2.getCacheControl().value());
+                || p1.getCacheControl().equals(p2.getCacheControl());
         }
         
         if (compatible) {            
@@ -454,7 +454,7 @@ public final class PolicyUtils {
       
         result &= (p1.getCacheControl() == null 
                 ? p2.getCacheControl() == null 
-                : p1.getCacheControl().value().equals(p2.getCacheControl().value())
+                : p1.getCacheControl().equals(p2.getCacheControl())
                 && p1.getConnection().value().equals(p2.getConnection().value()))
       
             && (p1.getConnectionTimeout() == p2.getConnectionTimeout())
             && equals(p1.getContentType(), p2.getContentType())
@@ -492,7 +492,7 @@ public final class PolicyUtils {
         
         if (compatible) {
             compatible &= !p1.isSetCacheControl() || !p2.isSetCacheControl()
-                || p1.getCacheControl().value().equals(p2.getCacheControl().value());
+                || p1.getCacheControl().equals(p2.getCacheControl());
         }
         
         if (compatible) {
@@ -605,7 +605,7 @@ public final class PolicyUtils {
         result &= (p1.isHonorKeepAlive() == p2.isHonorKeepAlive())
             && (p1.getCacheControl() == null 
                 ? p2.getCacheControl() == null 
-                : p1.getCacheControl().value().equals(p2.getCacheControl().value()))
+                : p1.getCacheControl().equals(p2.getCacheControl()))
             && equals(p1.getContentEncoding(), p2.getContentEncoding())
             && equals(p1.getContentLocation(), p2.getContentLocation())
             && equals(p1.getContentType(), p2.getContentType())

Modified: cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd?rev=1058329&r1=1058328&r2=1058329&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd (original)
+++ cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd Wed Jan 12
21:46:22 2011
@@ -114,7 +114,7 @@
                     </xs:annotation>      
                 </xs:attribute>
 
-                <xs:attribute name="CacheControl" type="http-conf:serverCacheControlType"
use="optional">
+                <xs:attribute name="CacheControl" type="xs:string" use="optional">
                     <xs:annotation>
                         <xs:documentation>
                         Most commonly used to specify no-cache, however the standard supports
a 
@@ -281,7 +281,7 @@
 
                 </xs:attribute>
 
-                <xs:attribute name="CacheControl" type="http-conf:clientCacheControlType"
use="optional">
+                <xs:attribute name="CacheControl" type="xs:string" use="optional">
                     <xs:annotation>
                         <xs:documentation>
                         Most commonly used to specify no-cache, however the standard supports
a 
@@ -371,33 +371,6 @@
         </xs:complexContent>
     </xs:complexType>
     
-    <xs:simpleType name="serverCacheControlType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="no-cache"/>
-            <xs:enumeration value="public"/>
-            <xs:enumeration value="private"/>
-            <xs:enumeration value="no-store"/>
-            <xs:enumeration value="no-transform"/>
-            <xs:enumeration value="must-revalidate"/>
-            <xs:enumeration value="proxy-revalidate"/>
-            <xs:enumeration value="max-age"/>
-            <xs:enumeration value="s-max-age"/>
-            <xs:enumeration value="cache-extension"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="clientCacheControlType">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="no-cache"/>
-            <xs:enumeration value="no-store"/>
-            <xs:enumeration value="max-age"/>
-            <xs:enumeration value="max-stale"/>
-            <xs:enumeration value="min-fresh"/>
-            <xs:enumeration value="no-transform"/>
-            <xs:enumeration value="only-if-cached"/>
-            <xs:enumeration value="cache-extension"/>
-        </xs:restriction>
-    </xs:simpleType>
 
     <xs:simpleType name="connectionType">
         <xs:restriction base="xs:string">



Mime
View raw message