Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Roku Guru

Heads-up: in fw5.3, ECP/SSDP returns header as "LOCATION:"

Noticed this strange behavior in a remote app - it was unable to auto-discover only the Roku players with the newest firmware 5.3

I investigated and think found the culprit - someone had changed one of the headers returned by the UPnP daemon (discovery process is SSDP - essentially HTTP over UDP). What has changed since <=5.2 is that one of the header names was sent as "Location:" before (and so documented in the ECP doc ) but now gets sent in all-caps as "LOCATION:"

So, if someone looks for that header name in case sensitive fashion to determine the IP of the player, their code will be broken. Case in point, this happens in DVPRemote app. Luckily it did not happen in my app but the only reason was that i don't rely on that header since a nasty bug in Roku firmware over two years ago (it was reporting the old IP even after it has been changed during DHCP renewal, thus causing steady stream of "your app does not work" grievances). That bug has long been fixed but my lack of trust in that particular header remained. Anyway.

I'd call this a bug if i could but HTTP RFC says header names are case-insensitive and SSDP follows that (unlike the header values in SSDP). I don't know why someone changed "Location:" to "LOCATION:", seems whimsical if there was no reason - but dropping this note to check if your roku:ecp discovery is misbehaving.
0 Kudos
5 REPLIES 5
RokuMarkn
Visitor

Re: Heads-up: in fw5.3, ECP/SSDP returns header as "LOCATION

There's a bug in the Android version of Youtube that requires the Location header to be all caps for DIAL to work. We changed our Location header to conform since any non-buggy client should not care about the case.

--Mark
0 Kudos
EnTerr
Roku Guru

Re: Heads-up: in fw5.3, ECP/SSDP returns header as "LOCATION

"RokuMarkn" wrote:
There's a bug in the Android version of Youtube that requires the Location header to be all caps for DIAL to work. We changed our Location header to conform since any non-buggy client should not care about the case.

Thanks for the explanation. "The big ones" screw up too. The mistake they (Youtube on Andoid developer) made was probably in reading SSDP spec that says unless otherwise specified, headers are case-sensitive - but that talks about the header values, not the keys.

I found some Android apps broken by the change too, Jigawatt Labs "Juice for Roku" and "Remote for Roku", PM'ed the author (i think)

You (Roku) should update the ECP doc to use the capitalized header. And point it out in the non-existent 😉 release notes to the developers
0 Kudos
greno
Visitor

Re: Heads-up: in fw5.3, ECP/SSDP returns header as "LOCATION

I got a note from a user that one of their two Rokus wasn't being discovered. After some debugging, I also came across this location case change and am working on a fix. Hopefully I can push out new versions of Juice for Roku and Remote for Roku by tomorrow.

-Gregg
0 Kudos
pirey4
Visitor

Re: Heads-up: in fw5.3, ECP/SSDP returns header as "LOCATION

Thanks for the heads up. I fixed DVPRemote and submitted a new copy to the app store.

phil
0 Kudos
RokuMarkn
Visitor

Re: Heads-up: in fw5.3, ECP/SSDP returns header as "LOCATION

I've updated the ECP documentation to note that the header names are case insensitive.

--Mark
0 Kudos