java.net.HttpURLConnection throws "Received authentication challenge is null"

by Matthias » Mon, 31 Aug 2009 20:57:58 GMT


Sponsored Links
 I am using HttpURLConnection to send a GET request to a server. Upon
reading the response code, the Android implementation of
HttpURLConnection.doRequestInternal() throws an exception:

"java.io.IOException: Received authentication challenge is null"

I don't even get what the error is trying to tell me. I write an OAuth
param string to the Authorization header, but this works fine on other
occasions. There is nothing peculiar about my request apart from that.

Any idea what this means, what is causing this and how to get around
it? This works fine with Sun's Java implementation, so I guess it's a
problem with Apache Harmony?

Thanks!
Matthias
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Update Contacts

Hi
I've got the following problem:
I want to update my contacts from a XML-File with the following lines
of code
ContentValues werte = new ContentValues();
werte.put(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME,
_sFamilyName);
werte.put(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
_sGivenName);
werte.put(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME,
_sMiddleName);
werte.put(ContactsContract.Data.MIMETYPE,
ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);

ContentResolver contacts = _context.getContentResolver();

int nRows = contacts.update(ContactsContract.Contacts.CONTENT_URI,
werte, ContactsContract.Data._ID + "=?", new String[]
{String.valueOf(_nContactID)});

the RowCount is 1, so it seems that it's updating something. But when
I check the Contact nothing happend.

What do I make wrong?

-- 

2. Closing canvas view and starting new activity

Hello,

I am playing around with the code in this tutorial:

http://www.anddev.org/basic_and_simple_2d_drawing_-_animation-t3085.html

The problem is I cannot end this activity and start a new one. I know
for XML views you would use this:

    finish();
    startActivity(new Intent(this, MenuActivity.class));

This does not work for canvas views though. Could someone please tell
me how I would be able to finish a canvas view and start a new
activity?

Thanks.

-- 

3. How to let ADB can support New Vendor IDs??

4. Wonderful! ~

5. how the spotify is managing local song playing?

6. Timezone List

7. ALSA giving timeval error