Re: WebDAV and Microsoft clients

2024-05-23 Thread Michael Osipov
On 2024/05/23 08:00:24 Mark Thomas wrote:
> On 22/05/2024 21:47, Michael Osipov wrote:
> > On 2024/05/22 17:21:07 Mark Thomas wrote:
> >> All,
> >>
> >> I've been looking at the WebDav Servlet for the last few days and in
> >> particular how it interacts with Microsoft clients.
> > 
> > Which clients are we talking about? Windows Explorer?
> 
> Yes. The client that gets used when you map a network drive using a 
> WebDAV endpoint.
> 
> > I know that DAV Redirector/Explorer are quite picky about TLS and 
> > authentication.
> 
> Thanks. That is useful to know. I'd read that BASIC auth was disabled by 
> default and required a registry tweak to use. I hadn't see anything 
> about TLS. I'll keep that in mind.

The only realiably way which works here for both mod_dav and Tomcat 'simpl is 
via TLS and SPNEGO authentication. The whole thing is designed to work in an 
enterprise environment, rather not at home.

M

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: (tomcat) branch main updated: Add support for shallow copies when using WebDAV

2024-05-23 Thread Mark Thomas

On 23/05/2024 12:53, Konstantin Kolinko wrote:

вт, 21 мая 2024 г. в 14:55, :


The following commit(s) were added to refs/heads/main by this push:
  new 4176706761 Add support for shallow copies when using WebDAV
4176706761 is described below

commit 4176706761242851b14be303daf2a00ef385ee49
Author: Mark Thomas 
AuthorDate: Tue May 21 12:54:40 2024 +0100

 Add support for shallow copies when using WebDAV





@@ -1583,7 +1598,9 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
  childSrc += "/";
  }
  childSrc += entry;
-copyResource(errorList, childSrc, childDest);
+if (infiniteCopy) {
+copyResource(errorList, childSrc, childDest, true);
+}
  }


I think that the "if (infiniteCopy)" block here is too narrow.

The whole loop over children (starting with "String[] entries =
resources.list(source)") here is useless when the infiniteCopy option
is false.


Thanks for the review. I've widened the block.

Thinking about it the infinite/not infinite copy option is fairly 
pointless. For a file it has no impact. For a directory you either copy 
the whole tree or just create a new directory - and MKCOL can be used 
for that. Oh well.


Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 9.0.x updated: Remove export / backport code - no longer required for 9.0.x

2024-05-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new fe768c5655 Remove export / backport code - no longer required for 9.0.x
fe768c5655 is described below

commit fe768c565572037d70afd32c0de81d0accb44718
Author: Mark Thomas 
AuthorDate: Thu May 23 13:36:41 2024 +0100

Remove export / backport code - no longer required for 9.0.x
---
 .../tomcat/buildutil/translate/BackportBase.java   | 65 
 .../buildutil/translate/BackportEnglish.java   | 67 
 .../buildutil/translate/BackportTranslations.java  | 68 -
 .../tomcat/buildutil/translate/Constants.java  |  2 -
 .../apache/tomcat/buildutil/translate/Utils.java   | 89 --
 .../tomcat/buildutil/translate/TestUtils.java  | 18 -
 6 files changed, 309 deletions(-)

diff --git a/java/org/apache/tomcat/buildutil/translate/BackportBase.java 
b/java/org/apache/tomcat/buildutil/translate/BackportBase.java
deleted file mode 100644
index 1a7ab7ed8e..00
--- a/java/org/apache/tomcat/buildutil/translate/BackportBase.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tomcat.buildutil.translate;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Base class providing common implementation for back-port utilities.
- */
-public abstract class BackportBase {
-
-protected final Map sourceTranslations = new 
HashMap<>();
-protected final Map targetTranslations = new 
HashMap<>();
-protected final File targetRoot;
-protected final Properties sourceEnglish;
-protected final Properties targetEnglish;
-protected final File storageDir;
-
-protected BackportBase(String... args) throws IOException {
-if (args.length != 1) {
-throw new IllegalArgumentException("Missing back-port target");
-}
-targetRoot = new File(args[0]);
-
-if (!targetRoot.isDirectory()) {
-throw new IllegalArgumentException("Back-port target not a 
directory");
-}
-
-File sourceRoot = new File(".");
-for (String dir : Constants.SEARCH_DIRS) {
-File directory = new File(dir);
-Utils.processDirectory(sourceRoot, directory, sourceTranslations);
-}
-
-for (String dir : Constants.SEARCH_DIRS) {
-File directory = new File(targetRoot, dir);
-Utils.processDirectory(targetRoot, directory, targetTranslations);
-}
-
-sourceEnglish = sourceTranslations.get("");
-targetEnglish = targetTranslations.get("");
-
-storageDir = new File(targetRoot, Constants.STORAGE_DIR);
-}
-
-protected abstract void execute() throws IOException;
-}
diff --git a/java/org/apache/tomcat/buildutil/translate/BackportEnglish.java 
b/java/org/apache/tomcat/buildutil/translate/BackportEnglish.java
deleted file mode 100644
index 8fd8b61a3e..00
--- a/java/org/apache/tomcat/buildutil/translate/BackportEnglish.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tomcat.buildutil.translate;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.S

(tomcat) 01/02: Add support for shallow copies when using WebDAV

2024-05-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 5ba3e76797babe431f16878825e2a6a192e18863
Author: Mark Thomas 
AuthorDate: Tue May 21 12:54:40 2024 +0100

Add support for shallow copies when using WebDAV
---
 .../apache/catalina/servlets/WebdavServlet.java| 31 +-
 webapps/docs/changelog.xml |  7 +
 2 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index fe26facb05..c5a4111f51 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1518,7 +1518,20 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 Map errorList = new HashMap<>();
 
-boolean result = copyResource(errorList, path, destinationPath);
+boolean infiniteCopy = true;
+String depthHeader = req.getHeader("Depth");
+if (depthHeader != null) {
+if (depthHeader.equals("infinity")) {
+// NO-OP - this is the default
+} else if (depthHeader.equals("0")) {
+infiniteCopy = false;
+} else {
+resp.sendError(WebdavStatus.SC_BAD_REQUEST);
+return false;
+}
+}
+
+boolean result = copyResource(errorList, path, destinationPath, 
infiniteCopy);
 
 if ((!result) || (!errorList.isEmpty())) {
 if (errorList.size() == 1) {
@@ -1547,16 +1560,18 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 /**
  * Copy a collection.
  *
- * @param errorList Hashtable containing the list of errors which occurred 
during the copy operation
- * @param sourcePath of the resource to be copied
- * @param dest  Destination path
+ * @param errorListMap containing the list of errors which occurred 
during the copy operation
+ * @param source   Path of the resource to be copied
+ * @param dest Destination path
+ * @param infiniteCopy {@code true} if this copy is to be an infinite 
copy, otherwise {@code false} for a shallow
+ * copy
  *
  * @return true if the copy was successful
  */
-private boolean copyResource(Map errorList, String source, 
String dest) {
+private boolean copyResource(Map errorList, String source, 
String dest, boolean infiniteCopy) {
 
 if (debug > 1) {
-log("Copy: " + source + " To: " + dest);
+log("Copy: " + source + " To: " + dest + " Infinite: " + 
infiniteCopy);
 }
 
 WebResource sourceResource = resources.getResource(source);
@@ -1582,7 +1597,9 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 childSrc += "/";
 }
 childSrc += entry;
-copyResource(errorList, childSrc, childDest);
+if (infiniteCopy) {
+copyResource(errorList, childSrc, childDest, true);
+}
 }
 } else if (sourceResource.isFile()) {
 WebResource destResource = resources.getResource(dest);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 956a1af8fc..541b3a9613 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,13 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Add support for shallow copies when using WebDAV. (markt)
+  
+
+  
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 9.0.x updated (f6d7d02984 -> 365535db88)

2024-05-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from f6d7d02984 Sync FFM for 9.0
 new 5ba3e76797 Add support for shallow copies when using WebDAV
 new 365535db88 Move infinite copy test to include all recurrsive code

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/catalina/servlets/WebdavServlet.java| 53 ++
 webapps/docs/changelog.xml |  7 +++
 2 files changed, 42 insertions(+), 18 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/02: Move infinite copy test to include all recurrsive code

2024-05-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 365535db8833cf0c36342c9c2633ea4d4eecad63
Author: Mark Thomas 
AuthorDate: Thu May 23 13:26:46 2024 +0100

Move infinite copy test to include all recurrsive code

Review by kkolinko
---
 .../apache/catalina/servlets/WebdavServlet.java| 26 +++---
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index c5a4111f51..ccdebc338e 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1585,19 +1585,19 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 }
 }
 
-String[] entries = resources.list(source);
-for (String entry : entries) {
-String childDest = dest;
-if (!childDest.equals("/")) {
-childDest += "/";
-}
-childDest += entry;
-String childSrc = source;
-if (!childSrc.equals("/")) {
-childSrc += "/";
-}
-childSrc += entry;
-if (infiniteCopy) {
+if (infiniteCopy) {
+String[] entries = resources.list(source);
+for (String entry : entries) {
+String childDest = dest;
+if (!childDest.equals("/")) {
+childDest += "/";
+}
+childDest += entry;
+String childSrc = source;
+if (!childSrc.equals("/")) {
+childSrc += "/";
+}
+childSrc += entry;
 copyResource(errorList, childSrc, childDest, true);
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 10.1.x updated: Move infinite copy test to include all recurrsive code

2024-05-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 09163e5985 Move infinite copy test to include all recurrsive code
09163e5985 is described below

commit 09163e5985c003bd5f33886614a72ffa1ae04f11
Author: Mark Thomas 
AuthorDate: Thu May 23 13:26:46 2024 +0100

Move infinite copy test to include all recurrsive code

Review by kkolinko
---
 .../apache/catalina/servlets/WebdavServlet.java| 26 +++---
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index b1b67030af..121d2d6593 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1586,19 +1586,19 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 }
 }
 
-String[] entries = resources.list(source);
-for (String entry : entries) {
-String childDest = dest;
-if (!childDest.equals("/")) {
-childDest += "/";
-}
-childDest += entry;
-String childSrc = source;
-if (!childSrc.equals("/")) {
-childSrc += "/";
-}
-childSrc += entry;
-if (infiniteCopy) {
+if (infiniteCopy) {
+String[] entries = resources.list(source);
+for (String entry : entries) {
+String childDest = dest;
+if (!childDest.equals("/")) {
+childDest += "/";
+}
+childDest += entry;
+String childSrc = source;
+if (!childSrc.equals("/")) {
+childSrc += "/";
+}
+childSrc += entry;
 copyResource(errorList, childSrc, childDest, true);
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Move infinite copy test to include all recurrsive code

2024-05-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 5b6258fb09 Move infinite copy test to include all recurrsive code
5b6258fb09 is described below

commit 5b6258fb096c2bd80ca0a944631efc887cb2b2e6
Author: Mark Thomas 
AuthorDate: Thu May 23 13:26:46 2024 +0100

Move infinite copy test to include all recurrsive code

Review by kkolinko
---
 .../apache/catalina/servlets/WebdavServlet.java| 26 +++---
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index b1b67030af..121d2d6593 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1586,19 +1586,19 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 }
 }
 
-String[] entries = resources.list(source);
-for (String entry : entries) {
-String childDest = dest;
-if (!childDest.equals("/")) {
-childDest += "/";
-}
-childDest += entry;
-String childSrc = source;
-if (!childSrc.equals("/")) {
-childSrc += "/";
-}
-childSrc += entry;
-if (infiniteCopy) {
+if (infiniteCopy) {
+String[] entries = resources.list(source);
+for (String entry : entries) {
+String childDest = dest;
+if (!childDest.equals("/")) {
+childDest += "/";
+}
+childDest += entry;
+String childSrc = source;
+if (!childSrc.equals("/")) {
+childSrc += "/";
+}
+childSrc += entry;
 copyResource(errorList, childSrc, childDest, true);
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68919] Make Tomcat return 503 on stopped web applications

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68919

--- Comment #7 from Konstantin Kolinko  ---
Some notes from me:

1. If a web application has been stopped (or failed to start), its mappings are
absent from the org.apache.catalina.mapper.Mapper.

That is the key point here. Period.


2. Falling back to the ROOT application is "well known".

E.g. it was used in Tomcat 5.5:
https://svn.apache.org/viewvc/tomcat/archive/tc5.5.x/trunk/container/webapps/ROOT/

It is a ROOT web application and it has an "admin" subdirectory.
It is used for the case when the "admin" web application has not been
installed.


3. Nowadays it is also possible to use the "Parallel deployment" feature to
install several versions of a web application in parallel.

https://tomcat.apache.org/tomcat-9.0-doc/config/context.html#Parallel_deployment

This works with the ROOT application itself as well. E.g. if "ROOT" is the
fallback webapp, and your "productive" webapp is named "ROOT##2024-05-23" and
fails to start, a request should be served by the "ROOT" one.

Quote, from config/context.html:
"String comparisons are used to determine version order. If version is not
specified, it is treated as the empty string. Therefore, foo.war will be
treated as an earlier version than foo##11.war"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: (tomcat) branch main updated: Add support for shallow copies when using WebDAV

2024-05-23 Thread Konstantin Kolinko
вт, 21 мая 2024 г. в 14:55, :
>
> The following commit(s) were added to refs/heads/main by this push:
>  new 4176706761 Add support for shallow copies when using WebDAV
> 4176706761 is described below
>
> commit 4176706761242851b14be303daf2a00ef385ee49
> Author: Mark Thomas 
> AuthorDate: Tue May 21 12:54:40 2024 +0100
>
> Add support for shallow copies when using WebDAV
> ---
>  .../apache/catalina/servlets/WebdavServlet.java| 31 
> +-
>  webapps/docs/changelog.xml |  7 +
>  2 files changed, 31 insertions(+), 7 deletions(-)
>
> diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
> b/java/org/apache/catalina/servlets/WebdavServlet.java
> index a489eb0e51..b1b67030af 100644
> --- a/java/org/apache/catalina/servlets/WebdavServlet.java
> +++ b/java/org/apache/catalina/servlets/WebdavServlet.java
> @@ -1519,7 +1519,20 @@ public class WebdavServlet extends DefaultServlet 
> implements PeriodicEventListen
>
>  Map errorList = new HashMap<>();
>
> -boolean result = copyResource(errorList, path, destinationPath);
> +boolean infiniteCopy = true;
> +String depthHeader = req.getHeader("Depth");
> +if (depthHeader != null) {
> +if (depthHeader.equals("infinity")) {
> +// NO-OP - this is the default
> +} else if (depthHeader.equals("0")) {
> +infiniteCopy = false;
> +} else {
> +resp.sendError(WebdavStatus.SC_BAD_REQUEST);
> +return false;
> +}
> +}
> +
> +boolean result = copyResource(errorList, path, destinationPath, 
> infiniteCopy);
>
>  if ((!result) || (!errorList.isEmpty())) {
>  if (errorList.size() == 1) {
> @@ -1548,16 +1561,18 @@ public class WebdavServlet extends DefaultServlet 
> implements PeriodicEventListen
>  /**
>   * Copy a collection.
>   *
> - * @param errorList Map containing the list of errors which occurred 
> during the copy operation
> - * @param sourcePath of the resource to be copied
> - * @param dest  Destination path
> + * @param errorListMap containing the list of errors which occurred 
> during the copy operation
> + * @param source   Path of the resource to be copied
> + * @param dest Destination path
> + * @param infiniteCopy {@code true} if this copy is to be an infinite 
> copy, otherwise {@code false} for a shallow
> + * copy
>   *
>   * @return true if the copy was successful
>   */
> -private boolean copyResource(Map errorList, String 
> source, String dest) {
> +private boolean copyResource(Map errorList, String 
> source, String dest, boolean infiniteCopy) {
>
>  if (debug > 1) {
> -log("Copy: " + source + " To: " + dest);
> +log("Copy: " + source + " To: " + dest + " Infinite: " + 
> infiniteCopy);
>  }
>
>  WebResource sourceResource = resources.getResource(source);
> @@ -1583,7 +1598,9 @@ public class WebdavServlet extends DefaultServlet 
> implements PeriodicEventListen
>  childSrc += "/";
>  }
>  childSrc += entry;
> -copyResource(errorList, childSrc, childDest);
> +if (infiniteCopy) {
> +copyResource(errorList, childSrc, childDest, true);
> +}
>  }

I think that the "if (infiniteCopy)" block here is too narrow.

The whole loop over children (starting with "String[] entries =
resources.list(source)") here is useless when the infiniteCopy option
is false.

>  } else if (sourceResource.isFile()) {
>  WebResource destResource = resources.getResource(dest);
> diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69031] Not Implemented 501 by truncated method name

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69031

--- Comment #12 from Pepe  ---
Thank you very much for the analysis. I will now take a closer look at
httpclient5. So the error remains in the apache family :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68919] Make Tomcat return 503 on stopped web applications

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68919

--- Comment #6 from Mark Thomas  ---
(In reply to Michael Osipov from comment #5)
> (In reply to Mark Thomas from comment #4)
> > How to respond when a web application is stopped is very much personal
> > preference. Some administrators will want 404, some 403, some something 
> > else.
> > 
> > Handing this is in the Mapper is non-trivial.
> 
> Can you explain why it is non-trivial if you have an attribute for this in
> ?

Try writing a patch to implement it.

> > Given that this can be handled by the ROOT web application as Chris
> > describes, I'm resolving this as WONTFIX.
> 
> That would work, but looks overly complicated and not really dynamic. I
> highly doubt that people would prefer to go that route.

Then we disagree. I consider it a simple solution and I've seen it used in
production.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68919] Make Tomcat return 503 on stopped web applications

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68919

--- Comment #5 from Michael Osipov  ---
(In reply to Mark Thomas from comment #4)
> How to respond when a web application is stopped is very much personal
> preference. Some administrators will want 404, some 403, some something else.
> 
> Handing this is in the Mapper is non-trivial.

Can you explain why it is non-trivial if you have an attribute for this in
?

> Given that this can be handled by the ROOT web application as Chris
> describes, I'm resolving this as WONTFIX.

That would work, but looks overly complicated and not really dynamic. I highly
doubt that people would prefer to go that route.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69031] Not Implemented 501 by truncated method name

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69031

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEEDINFO|RESOLVED

--- Comment #11 from Mark Thomas  ---
You have a broken client.

Looking at the full pcap file provided off-line, the request before the request
that fails declares a content length of 68350 bytes but only sends 68348 bytes.

Since HTTP pipe-lining is being used (multiple requests over a single
connection) the first two bytes of what the client considers to be the next
request are used to complete the request body of the previous request.

That leaves a request line that starts "LETE..." rather than "DELETE..." which
Tomcat correctly rejects.

You need to speak to the provider of your client to figure out why the content
length declared is not the content-length sent.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68742] SingleSignOn session invalidation logic fallacy results in 408 request timed out.

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68742

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|NEEDINFO|RESOLVED

--- Comment #3 from Mark Thomas  ---
No response for over a month. Resolving as WORKSFORME.

If this is still an issue then it can be re-opened if the requested information
is provided.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68919] Make Tomcat return 503 on stopped web applications

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68919

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #4 from Mark Thomas  ---
How to respond when a web application is stopped is very much personal
preference. Some administrators will want 404, some 403, some something else.

Handing this is in the Mapper is non-trivial.

Given that this can be handled by the ROOT web application as Chris describes,
I'm resolving this as WONTFIX.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69016] HttpURLConnection getOutputStream createCapacityException

2024-05-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69016

Mark Thomas  changed:

   What|Removed |Added

   Severity|blocker |normal

--- Comment #4 from Mark Thomas  ---
Dropping priority to normal. It really was a blocker, I'd expect a faster
response to our questions.

I'll note at this point that without the requested information, this issue will
eventually get resolved as WORKSFORME given that the issue appears to be that
the Servlet isn't writing a response body.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: WebDAV and Microsoft clients

2024-05-23 Thread Rémy Maucherat
On Wed, May 22, 2024 at 7:21 PM Mark Thomas  wrote:
>
> All,
>
> I've been looking at the WebDav Servlet for the last few days and in
> particular how it interacts with Microsoft clients.
>
> Basic operations including:
> - directory listings
> - create new file
> - create new directory
> - rename
> - update contents (ie open a file for editing and then saving it)
>
> all work for port 80 and port 8080 when WebDAV is mounted at "/" or a
> specific context.
>
> Drag/drop and copy/paste do not work. This appears to be related to
> Tomcat not implementing PROPPATCH. There is some guess work involved
> since I don't have access to the Microsoft code but I think the client
> is setting timestamps with PROPPATCH and then checking them. Because the
> PROPPATCH fails the overall operation is failed.
>
> I don't think that the WebdavFixFilter is required any more.
>
> I'd like to propose the following:
> - deprecate WebdavFixFilter in all current versions and then remove it
>in Tomcat 11
> - add the above information on what works and what doesn't to the
>WebdavServlet Javadoc - maybe along with a note to ping the dev list
>if drag/drop and copy/paste are required (or maybe a BZ issue)
> - come back to this if there is user interest in getting drag/drop and
>copy/paste working
>
> Thoughts?

+1, thanks for the research.

Not sure about proppatch obviously ;)

Rémy

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: WebDAV and Microsoft clients

2024-05-23 Thread Mark Thomas

On 22/05/2024 21:47, Michael Osipov wrote:

On 2024/05/22 17:21:07 Mark Thomas wrote:

All,

I've been looking at the WebDav Servlet for the last few days and in
particular how it interacts with Microsoft clients.


Which clients are we talking about? Windows Explorer?


Yes. The client that gets used when you map a network drive using a 
WebDAV endpoint.



I know that DAV Redirector/Explorer are quite picky about TLS and 
authentication.


Thanks. That is useful to know. I'd read that BASIC auth was disabled by 
default and required a registry tweak to use. I hadn't see anything 
about TLS. I'll keep that in mind.



You might want also try CarotDAV. It served me quite well testing mod_dav and 
Tomcat WebDAV servlet


Noted. My primary objective was to see if the WebdavFixFilter was still 
required (I don't think it is). Seeing what might be required to get 
better out of the box compatibility with the Windows Explorer client was 
secondary. That seems to be dependent on PROPPATCH support which looks 
to require a non-trivial amount of work to get working. I'm happy to 
look at that but without users calling for it, it is going to be low 
priority.


Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org