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 Robert Owen <Ro...@eur.sas.com> on 2002/04/11 12:40:13 UTC

Misleading exception when DAV server authentication fails using W ebdavResource

In the default case, the WebdavResource constructor has an implicit call to
find the basic property values for the resource. In propfindMethod(String
path, int depth, Vector properties), it calls on HttpClient to execute the
PROPFIND method. If the DAV server requires authentication to be performed
and the credentials supplied are invalid, HttpClient's executeMethod now
returns without an exception for a status code of 401 (SC_UNAUTHORIZED -
wrong user id /password given). However, propfindMethod doesn't check this
statusCode and tries to return method.getReponses() which fails with an
"IllegalStateException: Method must be executed before this function is
called" (executeMethod returns just before setting method used in this
case). This is a rather misleading message/situation for an invalid userid
or password.