So after looking at a lot of traces I think I have figured out what is going on.
1. Post to URL A with login credentials. (It is odd because the url I post to from the form action is the same url as the HTML for the login page)
2. Server responds with a 302 redirect and a set-cookie in the header of response
I need the cookie from the 302 redirect, but when I look at what is returned I just see the cookies and data from the login page itself. Is that possible to get on the roku?
The below works and shows the 302 redirect with the Set-Cookie in the header and then loads the proper data page.
wget --post-data "name=me%40me.com&password=mypassword" http://my.com/login
If I intentionally send the wrong credentials I get the following headers (GetString was at the top and just returned the full html, I cut it out to save space here):
Cache-Control
Cache-Control
Connection
Content-Language
Content-Length
Content-Type
Date
Expires
Pragma
Server
Set-Cookie
JSESSIONID=495C08A304A500954774853F187668A7; Path=/
Set-Cookie
NSC_tvqfsqbtt-bqq2.sfbm.dpn=ffffffffaf16e4f145525d5f4f58455e445a4a4229a0;expires=Sat, 09-Jul-2011 01:41:56 GMT;path=/
But if I send the correct credentials to the login page I get the following headers (notice no Set-Cookies and GetString doesn't have any data):
GetString:
Cache-Control
Cache-Control
Date
Expires
Pragma
Server
Using wget if I send the correct credentials I get the following headers:
HTTP/1.1 302 Moved Temporarily
Date: Sat, 09 Jul 2011 01:09:25 GMT
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Location: http://me.com/login
Content-Language: en-US
Content-Length: 0
Set-Cookie: JSESSIONID=C65945E3DCDC50F8C03F4B8F93232052; Path=/
Set-Cookie: sp_user=0a19790307e34bdfsddfasdfdsfasdfb67f51cfade4df306c8c7ca11a9095de88b3997d76ac5875cbf0a49e68dd7c74bd5fef3208b538df6cc214a95514e89d828e6cf7867f03e1fe32acc00ab481fa643d59541cc209c4a87e661a8be9af2616f6e460757f3172deae7f611a84f3a2bdd15e1bac8fcb0cf27ef; Domain=.me.com; Expires=Fri, 7 Oct 2011 01:09:26 GMT; Path=/;
Set-Cookie: NSC_tvqfsqbtt-bqq2.sfbm.dpn=ffffadffaf16e48045525d5f4f5845fgddfg445a4a4229a0;expires=Sat, 09-Jul-2011 01:24:26 GMT;path=/
Connection: close
Content-Type: text/plain; charset=UTF-8
Once again, any help is appreciated.