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: 
RokuMarkn
Visitor

Re: CloudFront Secure streaming

belltown,
Yes, the incorrect handling of tilde is a bug. I have filed a bug report.

--Mark
0 Kudos
ShifterFilms
Visitor

Re: CloudFront Secure streaming

Hi Mark -

So with tildes is there any other option besides what I'm doing using a URL shortener?

Not a big deal, my solution seems to be working. I've set up a cron to run the script hourly, and my URL's expire after two hours. Now that the shortener has been scripted in, I don't see the point in undoing it.

Is there any reason I would not want to use a URL shortener?
0 Kudos
RokuMarkn
Visitor

Re: CloudFront Secure streaming

Actually it has been pointed out to me that RFC 3986 supersedes 1738, and it changes tilde to an unreserved character. So I think the current behavior is correct, and the tildes in the URL don't need to be encoded.

--Mark
0 Kudos
belltown
Roku Guru

Re: CloudFront Secure streaming

"RokuMarkn" wrote:
Actually it has been pointed out to me that RFC 3986 supersedes 1738, and it changes tilde to an unreserved character. So I think the current behavior is correct, and the tildes in the URL don't need to be encoded.

--Mark

Yes, it does look like UrlEncode () and Escape () both encode according to RFC 3986, in which case the bug would apply to the SDK documentation. The documentation states that Escape () will "URL encode the specified string using CURL" and that UrlEncode () uses an "Alternate URL encoding scheme with stricter RFC 1738 compliance". It appears that they both do the same thing, which is to encode according to RFC 3986.

I don't think any of this helps ShifterFilms with his problem, since none of the characters in the url he gave would require encoding, according to RFC 3986, although I agree that it's a good idea in general to encode parameters in the url query string.
0 Kudos
ShifterFilms
Visitor

Re: CloudFront Secure streaming

Thanks for all of the help and suggestions!

With the URL encode, unless there's a good reason to not do it, I'm sticking with the set-up of using a URL shortener. I installed YOURLS open source software to shorten URLs.

My PHP script creating XML files sends the URL created from the script I posted earlier and creates a shortened URL without any parameters added to the URL.

Then a cron job on the server runs hourly to create new URLs. Thus I have expiring URLs that CloudFront likes and the entire process is automated.

It seems to be working perfectly for my needs.
0 Kudos