pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: DigestAuthentication starts to work
Date Mon, 25 May 2009 15:20:17 GMT
>> I still don't think we should need to modify the Query class to support digest authentication.
I'd suggest that this code go in the DigestAuthentication class itself.
>I am sorry that you think so, but this minimal change (only move the
>if check on the status code some lines under) is necessary to have the
>responseHeaders filled with response data, so i can retry the query
>(they are get from connection).

You are correct - the exception should be thrown after the headers have been set. It is valid
for a non-success response to return headers. I have made this change.

I wondered briefly if we should also support a response body in this case, but I'm currently
thinking no. We wouldn't be able to return the body as the task result, since we throw in
this case. We could potentially add a "detail" property to QueryException, but then we'd need
a way to specify a serializer to use for the fault data (since it is potentially different
from the one for the success data). But this all seems excessive - if the server needed to
return additional information about the fault, it could do so via a response header. I think
that is sufficient. What do others think?

Greg



Mime
View raw message