Minor bug in SimpleWebDavServlet

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Minor bug in SimpleWebDavServlet

Marc Speck
When PathInfo is null or "/", a response is already created and it makes no
sense to call super.service() anymore:


Index: SimpleWebDavServlet.java
===================================================================
--- SimpleWebDavServlet.java    (revision 691120)
+++ SimpleWebDavServlet.java    (working copy)
@@ -85,9 +85,9 @@
                 uri += slingRepo.getDefaultWorkspace();
                 response.sendRedirect(uri);
             }
+        } else {
+            super.service(request, response);
         }
-
-        super.service(request, response);
     }

     // ---------- SCR integration
----------------------------------------------


Regards,
Marc
Reply | Threaded
Open this post in threaded view
|

Re: Minor bug in SimpleWebDavServlet

Felix Meschberger-2
Hi Marc,

Thanks alot for this report.

Regards
Felix

Marc Speck schrieb:

> When PathInfo is null or "/", a response is already created and it makes no
> sense to call super.service() anymore:
>
>
> Index: SimpleWebDavServlet.java
> ===================================================================
> --- SimpleWebDavServlet.java    (revision 691120)
> +++ SimpleWebDavServlet.java    (working copy)
> @@ -85,9 +85,9 @@
>                  uri += slingRepo.getDefaultWorkspace();
>                  response.sendRedirect(uri);
>              }
> +        } else {
> +            super.service(request, response);
>          }
> -
> -        super.service(request, response);
>      }
>
>      // ---------- SCR integration
> ----------------------------------------------
>
>
> Regards,
> Marc
>

Reply | Threaded
Open this post in threaded view
|

Re: Minor bug in SimpleWebDavServlet

Felix Meschberger-2
In reply to this post by Marc Speck
Hi Marc,

I fixed this in Rev. 691374 of the jcr/webdav module as per SLING-639 [1].

Could you please verify, the fix is correct ? Thanks.

Regards
Felix

[1] https://issues.apache.org/jira/browse/SLING-639

Marc Speck schrieb:

> When PathInfo is null or "/", a response is already created and it makes no
> sense to call super.service() anymore:
>
>
> Index: SimpleWebDavServlet.java
> ===================================================================
> --- SimpleWebDavServlet.java    (revision 691120)
> +++ SimpleWebDavServlet.java    (working copy)
> @@ -85,9 +85,9 @@
>                  uri += slingRepo.getDefaultWorkspace();
>                  response.sendRedirect(uri);
>              }
> +        } else {
> +            super.service(request, response);
>          }
> -
> -        super.service(request, response);
>      }
>
>      // ---------- SCR integration
> ----------------------------------------------
>
>
> Regards,
> Marc
>

Reply | Threaded
Open this post in threaded view
|

Re: Minor bug in SimpleWebDavServlet

Marc Speck
Thanks for patching, it's fine for me.
Marc
Reply | Threaded
Open this post in threaded view
|

Re: Minor bug in SimpleWebDavServlet

Felix Meschberger-2
Hi Marc,

Thanks. So I closed the issue.

Regards
Felix

Marc Speck schrieb:
> Thanks for patching, it's fine for me.
> Marc
>