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

commit 33fe0f9be8740f8f8014400807967f5086799605
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 31 17:30:12 2023 +0100

    Simplify code
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 38448532aa..067c3d5a49 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -870,9 +870,7 @@ public class WebdavServlet extends DefaultServlet {
 
         int lockDuration = DEFAULT_TIMEOUT;
         String lockDurationStr = req.getHeader("Timeout");
-        if (lockDurationStr == null) {
-            lockDuration = DEFAULT_TIMEOUT;
-        } else {
+        if (lockDurationStr != null) {
             int commaPos = lockDurationStr.indexOf(',');
             // If multiple timeouts, just use the first
             if (commaPos != -1) {


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

Reply via email to