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 oz...@apache.org on 2004/10/05 13:31:28 UTC
cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method AbstractWebdavMethod.java
ozeigermann 2004/10/05 04:31:28
Modified: src/webdav/server/org/apache/slide/webdav/method
AbstractWebdavMethod.java
Log:
When checking locks forbidden responses caused stack traces done in the webdav servlet.
Suppressed them...
Revision Changes Path
1.52 +6 -4 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.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- AbstractWebdavMethod.java 26 Sep 2004 14:52:32 -0000 1.51
+++ AbstractWebdavMethod.java 5 Oct 2004 11:31:28 -0000 1.52
@@ -394,7 +394,9 @@
} catch (SlideException ex) {
int statusCode = getErrorCode( ex );
sendError( statusCode, ex );
- throw new WebdavException( statusCode );
+ // do not throw exception as the response code has already been set,
+ // otherwise the servlet will log this as an error and issue a stack trace
+// throw new WebdavException( statusCode );
} catch (Exception ex) {
token.getLogger().log(ex,LOG_CHANNEL,Logger.ERROR);
int statusCode = WebdavStatus.SC_INTERNAL_SERVER_ERROR;
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method
AbstractWebdavMethod.java
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Oliver Zeigermann schrieb:
> When locks are being checked and the user does not have suffient rights
> to do so a stack trace was displayed indicating something bad happened.
> Instead only the error code should be set and the exception should be
> suppressed. That's what is done when something like this happens in the
> concrete methods.
>
> Should I take this over into the release branch?
Did it for now in order not to forget. If anyone has objections I will
undo it ASAP.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method
AbstractWebdavMethod.java
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
When locks are being checked and the user does not have suffient rights
to do so a stack trace was displayed indicating something bad happened.
Instead only the error code should be set and the exception should be
suppressed. That's what is done when something like this happens in the
concrete methods.
Should I take this over into the release branch?
Oliver
ozeigermann@apache.org schrieb:
> ozeigermann 2004/10/05 04:31:28
>
> Modified: src/webdav/server/org/apache/slide/webdav/method
> AbstractWebdavMethod.java
> Log:
> When checking locks forbidden responses caused stack traces done in the webdav servlet.
> Suppressed them...
>
> Revision Changes Path
> 1.52 +6 -4 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.51
> retrieving revision 1.52
> diff -u -r1.51 -r1.52
> --- AbstractWebdavMethod.java 26 Sep 2004 14:52:32 -0000 1.51
> +++ AbstractWebdavMethod.java 5 Oct 2004 11:31:28 -0000 1.52
> @@ -394,7 +394,9 @@
> } catch (SlideException ex) {
> int statusCode = getErrorCode( ex );
> sendError( statusCode, ex );
> - throw new WebdavException( statusCode );
> + // do not throw exception as the response code has already been set,
> + // otherwise the servlet will log this as an error and issue a stack trace
> +// throw new WebdavException( statusCode );
> } catch (Exception ex) {
> token.getLogger().log(ex,LOG_CHANNEL,Logger.ERROR);
> int statusCode = WebdavStatus.SC_INTERNAL_SERVER_ERROR;
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org