Commits

Sebastian Sdorra  committed a59610f

revert revision 49 decode all location header

  • Participants
  • Parent commits f0857ab

Comments (0)

Files changed (1)

File svnkit-dav.12

 # HG changeset patch
-# Parent a4af96552d12110d35c4e715b6349cc1a1847c90
+# Parent 8969e565d95fb67ada46e512cc556e836ff045ce
 Location header should not be url encoded
 
-diff -r a4af96552d12 svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/DAVPathUtil.java
---- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/DAVPathUtil.java	Sat Dec 08 18:27:32 2012 +0100
-+++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/DAVPathUtil.java	Sun Dec 09 10:48:48 2012 +0100
+diff -r 8969e565d95f svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/DAVPathUtil.java
+--- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/DAVPathUtil.java	Fri Nov 30 08:55:18 2012 +0100
++++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/DAVPathUtil.java	Fri Dec 21 15:33:16 2012 +0100
 @@ -122,10 +122,18 @@
                      DAVElement.SVN_DAV_ERROR_NAMESPACE, 0, null);
          }
          context = context == null ? "" : context;
          if (addHref) {
              SVNXMLUtil.openXMLTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, DAVElement.HREF.getName(), SVNXMLUtil.XML_STYLE_PROTECT_CDATA, 
-diff -r a4af96552d12 svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVMakeCollectionHandler.java
---- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVMakeCollectionHandler.java	Sat Dec 08 18:27:32 2012 +0100
-+++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVMakeCollectionHandler.java	Sun Dec 09 10:48:48 2012 +0100
-@@ -21,6 +21,7 @@
- import org.tmatesoft.svn.core.internal.server.dav.DAVRepositoryManager;
- import org.tmatesoft.svn.core.internal.server.dav.DAVResource;
- import org.tmatesoft.svn.core.internal.server.dav.DAVResourceState;
-+import org.tmatesoft.svn.core.internal.util.SVNEncodingUtil;
- 
- 
- /**
-@@ -85,7 +86,10 @@
-         }
- 
-         notifyCreated(resource, lockProvider, resourceState, DAVDepth.DEPTH_ZERO);
--        handleDAVCreated(null, "Collection", false);
-+        
-+        // use decoded location header
-+        String location = SVNEncodingUtil.uriDecode(getURI());
-+        handleDAVCreated(location, "Collection", false);
-     }
- 
-     protected DAVRequest getDAVRequest() {
-diff -r a4af96552d12 svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVPutHandler.java
---- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVPutHandler.java	Sat Dec 08 18:27:32 2012 +0100
-+++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVPutHandler.java	Sun Dec 09 10:48:48 2012 +0100
-@@ -165,7 +165,9 @@
- 
-         notifyCreated(resource, lockProvider, resourceState, DAVDepth.DEPTH_ZERO);
- 
--        handleDAVCreated(null, "Resource", resourceState == DAVResourceState.EXISTS);
-+        // use decoded location header
-+        String location = SVNEncodingUtil.uriDecode(getURI());
-+        handleDAVCreated(location, "Resource", resourceState == DAVResourceState.EXISTS);
-     }
- 
-     protected DAVRequest getDAVRequest() {
-diff -r a4af96552d12 svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVUpdateHandler.java
---- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVUpdateHandler.java	Sat Dec 08 18:27:32 2012 +0100
-+++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVUpdateHandler.java	Sun Dec 09 10:48:48 2012 +0100
+diff -r 8969e565d95f svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVUpdateHandler.java
+--- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVUpdateHandler.java	Fri Nov 30 08:55:18 2012 +0100
++++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/DAVUpdateHandler.java	Fri Dec 21 15:33:16 2012 +0100
 @@ -720,7 +720,7 @@
  
      private StringBuffer addVersionURL(String path, StringBuffer xmlBuffer) {
          xmlBuffer = SVNXMLUtil.openXMLTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, "checked-in", SVNXMLUtil.XML_STYLE_NORMAL, null, xmlBuffer);
          SVNXMLUtil.openCDataTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, "href", url, xmlBuffer);
          SVNXMLUtil.closeXMLTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, "checked-in", xmlBuffer);
-diff -r a4af96552d12 svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/ServletDAVHandler.java
---- a/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/ServletDAVHandler.java	Sat Dec 08 18:27:32 2012 +0100
-+++ b/svnkit-dav/src/main/java/org/tmatesoft/svn/core/internal/server/dav/handlers/ServletDAVHandler.java	Sun Dec 09 10:48:48 2012 +0100
-@@ -101,6 +101,7 @@
- import org.xml.sax.SAXNotRecognizedException;
- import org.xml.sax.SAXNotSupportedException;
- import org.tmatesoft.svn.core.internal.io.dav.http.XMLReader;
-+import org.tmatesoft.svn.core.internal.util.SVNURLUtil;
- /**
-  * @author TMate Software Ltd.
-  * @version 1.2.0
-@@ -1479,7 +1480,7 @@
-             setResponseStatus(HttpServletResponse.SC_NO_CONTENT);
-             return;
-         }
--
-+        
-         setResponseHeader(HTTPHeader.LOCATION_HEADER, constructURL(location));
-         String body = what + " " + SVNEncodingUtil.xmlEncodeCDATA(location) + " has been created.";
-         response(body, DAVServlet.getStatusLine(HttpServletResponse.SC_CREATED), HttpServletResponse.SC_CREATED);