Protocol exception : too many redirects

by steVe » Tue, 09 Mar 2010 01:44:08 GMT


Sponsored Links
 Hi All,

I get this protocol exception error when I try to read a rss feed. Its
loading fine on the emulator. But when I test on my device (Droid), it
throws the below error.

---------------------------------------------------
03-08 12:29:25.210: ERROR/AndroidRuntime(5108): Caused by:
java.net.ProtocolException: Too many redirects
03-08 12:29:25.210: ERROR/AndroidRuntime(5108):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequestInternal(HttpURLConnection.java:
1626)
03-08 12:29:25.210: ERROR/AndroidRuntime(5108):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequest(HttpURLConnection.java:
1551)
03-08 12:29:25.210: ERROR/AndroidRuntime(5108):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1052)
03-08 12:29:25.210: ERROR/AndroidRuntime(5108):     at
com.aol.engadget.parser.BaseFeedParser.getInputStream(BaseFeedParser.java:
45)
03-08 12:29:25.210: ERROR/AndroidRuntime(5108):     ... 9 more
---------------------------------------------------

It stops here on getInputStream.

At the same time I am reading another two feeds from the same server.
It loads and parses fine...

Here is the code

Xml.parse(this.getInputStream(), Xml.Encoding.UTF_8,
root.getContentHandler());

protected InputStream getInputStream() {
                try {
                        URLConnection feedCon = feedUrl.openConnection();

                        return feedCon.getInputStream();
                } catch (IOException e) {
                        throw new RuntimeException(e);
                }
        }


Am I doing anything wrong ? Or is it a bug ?


--



Other Threads

1. How to build a standalone library and link to the android kernel

Hi,

I need to build my standalone library and integrate to the Android
kernel, and expose my APIs to the applications so that the
applications can call to use my library.

Can anyone provide some related information? Thank you in advance!

James.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

2. Making call from Emulator

Hi  All

can we make the the VoIP call from the Android Emulator using the
Sipdroid

to anather VoIP client running on a mobile device.



thanks

-- 

3. ROM Cyanogen 4.2.5 are ready :D

4. Close ContextMenu on touch

5. How to force hw.lcd.density for a specific app

6. Bitmap and editText in onDraw()

7. Where is the DDMS allocation tracker