setResponseCode(httpCon.getResponseCode());
setResponseCodeText(httpCon.getResponseMessage());
// not authenticated; setup digest authentication and resend request
if (getResponseCode() == 401) {
Digest digResp = Digest.extractFrom(httpCon);
if (digResp.isValid()) {
// reconnect
httpCon.disconnect();
httpCon = openConnection(sMethod, bSendData);
// setup credentials
digResp.injectTo(httpCon,(UsernamePasswordCredentials)getCredentials());
// send data if required
if (bSendData) {
sendData(httpCon);
}