08-29-2012 09:28 PM
I have a very strange problem. When I use standard HTTPConnection I am expecting the response code as 303 with Location header because server is having redirection response. But unfortunately I am not getting that. Instead of that it goes to the redirected URL and give me directly response code as 200 with the content on the next URL.
This is happening with SDK 6.0 and above. The sample code as
Httpconnection conn = (HttpConnection) Connector.open(url, Connector.READ_WRITE);
int code = conn.getResponseCode();
I need the response code 303 because the redirected URL is a video URL and reading the content of that is not feasible because it is too large. I want to handle the response code 303 when received and when some pattern is matched with the URL I'll to launch the Browser so that video can be played easily.
08-30-2012 02:53 AM