Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gaurachit
Level 8

Re: Problem with HTTP redirect 302 and HLS

Hi Joel,
Thanks for quick reply. I tried the method which you have suggested but no luck.
I am not able to get the header data means
h = msg.GetResponseHeaders()
Print h
this is returning blank.
As sdkdocs said:
GetResponseHeaders() as Object
Returns an roAssociativeArray containing all the headers returned by the server for appropriate protocols (such as HTTP).
Headers are only returned when the status code is greater than or equal to 200 and less than 300.

The response code which I am getting is "-3" and that's why I am not able to get the header data.

but when I am trying the API directly on browser its giving me the XML.
Is there any other way to work with this
0 Kudos
RokuJoel
Roku Employee
Roku Employee

Re: Problem with HTTP redirect 302 and HLS

I wonder if ifURLTransfer.retainBodyOnError would help, and also, have you tried the GetResponseHeadersArray method of roUrlEvent?

- Joel
0 Kudos
RokuMarkn
Level 8

Re: Problem with HTTP redirect 302 and HLS

-3 is not an http status code of course, since all status codes are positive 3-digit integers. If you're getting this -3 value from roUrlEvent.GetResponseCode, the doc (http://sdkdocs.roku.com/display/sdkdoc/roUrlEvent) says that that value means CURLE_URL_MALFORMAT. So it sounds like your URL is invalid.

Also, this doesn't have anything to do with the original topic (redirects and HLS), does it? And Roku does support redirects internally. I'm not sure if it did at the time the original post was posted, over 3 years ago, which demonstrates the reason it's not a good idea to post to very old threads.

--Mark
0 Kudos