You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by lu...@apache.org on 2004/07/13 11:25:30 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method AbstractWebdavMethod.java

luetzkendorf    2004/07/13 02:25:30

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        AbstractWebdavMethod.java
  Log:
  support for Content-Type header added
  
  Revision  Changes    Path
  1.37      +27 -9     jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java
  
  Index: AbstractWebdavMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- AbstractWebdavMethod.java	7 Jul 2004 15:08:59 -0000	1.36
  +++ AbstractWebdavMethod.java	13 Jul 2004 09:25:30 -0000	1.37
  @@ -46,7 +46,6 @@
   import org.apache.slide.common.ServiceAccessException;
   import org.apache.slide.common.SlideException;
   import org.apache.slide.common.SlideToken;
  -import org.apache.slide.common.SlideTokenWrapper;
   import org.apache.slide.content.Content;
   import org.apache.slide.content.NodeProperty;
   import org.apache.slide.content.NodeProperty.NamespaceCache;
  @@ -153,7 +152,7 @@
   
   
       /**
  -     * Requested Uri.
  +     * Requested Slide-Uri.
        */
       protected String requestUri;
   
  @@ -419,7 +418,7 @@
   
   
       /**
  -     * Return an absolute URL (absolute in the HTTP sense) based on a Slide
  +     * Return an absolute URL path (absolute in the HTTP sense) based on a Slide
        * path.
        */
       public String getFullPath(String slidePath) {
  @@ -878,7 +877,7 @@
        * Generate status text.
        *
        * @param parentElement  the parent Element to append to.
  -     * @param href Uri of the object
  +     * @param href Slide-Uri of the object
        * @param statusCode HTTP status code of the error
        */
       protected void generateStatusText(Element parentElement, String href, int statusCode) {
  @@ -1255,6 +1254,7 @@
           private String hSubscriptionLifetimeStr;
           private String hTxIdStr;
           private String hTxMethodStr;
  +        private String hContentTypeStr;
   
           // parsed headers
           private List hIf;
  @@ -1271,6 +1271,7 @@
           private int hSubscriptionLifetime;
           private String hTxId;
           private String hTxMethod;
  +        private String hContentType;
   
           // states
           private int stIf = ST_UNDEFINED;
  @@ -1287,6 +1288,7 @@
           private int stSubscriptionLifetime = ST_UNDEFINED;
           private int stTxId = ST_UNDEFINED;
           private int stTxMethod= ST_UNDEFINED;
  +        private int stContentType = ST_UNDEFINED;
   
           protected RequestHeaders() {
           }
  @@ -1485,9 +1487,17 @@
                   return hTxMethod;
               }
           }
  +        
  +        protected String getContentType() {
  +           if (stContentType == ST_UNDEFINED) {
  +              return null;
  +           } else {
  +              return hContentType;
  +           }
  +        }
   
           protected void parse() {
  -            // TramsactionId header
  +            // TransactionId header
               hTxIdStr = req.getHeader(H_TRANSACTION);
               if (hTxIdStr != null) {
                   stTxId = ST_DEFINED;
  @@ -1498,7 +1508,7 @@
                   }
               }
   
  -            // TramsactionMethod header
  +            // TransactionMethod header
               hTxMethodStr = req.getHeader(H_TRANSACTION_METHOD);
               if (hTxMethodStr != null) {
                   stTxMethod = ST_DEFINED;
  @@ -1654,6 +1664,14 @@
                   stLabel = ST_DEFINED;
                   hLabel = hLabelStr;
               }
  +            
  +            // Content-Type header
  +            hContentTypeStr = req.getHeader(H_CONTENT_TYPE);
  +            if (hContentTypeStr != null) {
  +               stContentType = ST_DEFINED;
  +               hContentType = hContentTypeStr; 
  +            }
  +            
           }
           
           private List extractLockTokens(String hStr) {
  
  
  

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